[Haskell-cafe] fromString and toString
Ben Foppa
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>
wrote:
> 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:
>
> http://hackage.haskell.org/package/stringable-0.1.2/docs/
> Data-Stringable.html
>
> which seems like it's addressing the same problem you're trying to solve.
>
> --Patrick
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140220/67edd207/attachment.html>
More information about the Haskell-Cafe
mailing list