[Haskell-cafe] How to support multiple string types in Haskell?

Mario Blazevic mblazevic at stilo.com
Thu Jul 14 18:13:53 UTC 2016

On Wed, Jul 13, 2016 at 8:40 PM, KwangYul Seo <kwangyul.seo at gmail.com>

> Hi all,
> There are multiple string types in Haskell – String, lazy/strict
> ByteString, lazy/strict Text to name a few. So to make a string handling
> function maximally reusable, it needs to support multiple string types.
> ...
> It seems StringLike type class is quite generic but it is used only in the
> TagSoup package. This makes me wonder what is the idiomatic way to support
> multiple string types in Haskell. What other approaches do we have?

StringLike is only one of the packages supplying the class or classes to
support all the usual string types. There is also ListLike and (my own)
monoid-subclasses. You can visit
http://packdeps.haskellers.com/reverse to see all their reverse
dependencies and see how they're used.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160714/d929e053/attachment.html>

More information about the Haskell-Cafe mailing list