[Haskell] ANN: ListLike, a generic interface over list-like structures

John Goerzen jgoerzen at complete.org
Mon Sep 17 15:29:46 EDT 2007


I'm pleased to announce the first release of ListLike, a generic
interface to the various list-like structures in Haskell.

This grew out of the annoyance at having to handle Strings and
ByteStrings differently in my code, and has expanded on well past there.

ListLike implements an API very similar to Data.List, but based on a
typeclass.  The module ships with instance definitions for lists,
ByteStrings, lazy ByteStrings, Arrays, and even Maps.

Additional classes are available for types that implement some
additional features: String-like behavior, infinite list capability, and

Finally, an extensive set of default functions is provided.  Only
minimal effort -- as little as four functions -- are needed to make your
list-like type an instance of ListLike.

ListLike is backed by an extensive suite of QuickCheck tests wrapped in HUnit,
which tests virtually every function against every type.  As of right
now, 1567 test cases are executed, and all pass.


Download from:

API ref:

Hackage page:

-- John

More information about the Haskell mailing list