On 8 March 2012 10:53, Simon Hengel <s...@typeful.net> wrote:
> 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?).

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to