[Haskell-cafe] fromString and toString

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Tue Feb 4 14:13:13 UTC 2014

Ben Foppa <benjamin.foppa <at> gmail.com> writes:

> But do we have an inverse generic function toString defined anywhere? 

well, we have:  class Show a where show :: a -> String

> likereString :: (IsString a, IsString b) => a -> b

well you probably don't want to actually convert from a to String
(= List of Char) then from there to b, 
so it would need to be accompanied by some RULES 
(for specific instances of a, b) for efficiency.

This still does not answer the concern whether it is 
(semantically) wise to have String as the "base" concept here.

- J.W.

More information about the Haskell-Cafe mailing list