
4 Feb
2014
4 Feb
'14
9:03 a.m.
04.02.2014, 17:55, "Ben Foppa"
I know we have
class IsString a where
fromString :: String -> a
But do we have an inverse generic function toString defined anywhere? IsString implies that the type `a` is a subset of String; if all we have is fromString, then IsString defines supersets of String. To me, the most logical thing would be that IsString defines bijections to String (i.e. things that are subsets and supersets).
There's more than one way to interpret a ByteString as a String/Text and vice versa. If reString exists, what would you expect it to do when called with a ~ ByteString and b ~ Text?