[Haskell-cafe] fromString and toString
benjamin.foppa at gmail.com
Thu Feb 20 21:18:45 UTC 2014
That's exactly what I want, thank you!
On Feb 20, 2014 2:15 AM, "Patrick Pelletier" <code at funwithsoftware.org>
> On 2/4/14, 5:55 AM, Ben Foppa wrote:
> The reason this came up is that I'm getting pretty sick of type-juggling
>> different string types from different libraries (String, Text, various
>> ByteStrings), especially since I have to tweak all the functions I use
>> if a type changes; discovering fromString was fantastic, but without
>> toString, I can't define something like
>> reString :: (IsString a, IsString b) => a -> b
>> which is great to have if your putStrLn only accepts one kind of string,
>> and you have several distinct ones floating around.
> Although it doesn't seem to be used much, I noticed that there's this
> package on Hackage:
> which seems like it's addressing the same problem you're trying to solve.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe