I hear that Data.Text
is going to replace String
s in future Haskell versions. One issue I have with this is that (++)
is defined for lists only. To concatenate two Text
s, I need to use
text1 `mappend` text2
Which gets verbose quickly. Ideally I'd like to be able to use ++
on these Text
s, but if not, what is another alternative? I could define my own infix operator, but I'd like a standard way of doing this.
From GHC 7.4 (not sure which point version) there is a predefined <>
operator that works the same as mappend
. So you'll be able to say
text1 <> text2
So that's the "standard" infix operator, but it's not available everywhere yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With