
8 Mar
2012
8 Mar
'12
5 a.m.
On 8 March 2012 10:53, Simon Hengel
When writing library code that should work with both String and Text I find my self repeatedly introducing classes like:
class ToString a where toString :: a -> String
class ToText a where toText :: a -> Text
Text is already an instance of IsString which provides IsString. I've defined ToString in my own projects though, it would be nice for it to be defined somewhere (Data.String maybe?).