Is there already a list class?

Matthew Brecknell haskell at brecknell.org
Tue Jan 9 20:23:20 EST 2007


> Is here the right place to request a list class?
> eg
> class List l e where
> 	(:) :: e -> l e -> l e
> 	head :: ..
> 
> This might be used in Data.Set, Data.Map
> 
> class StorableAsList l e t where
> 	fromList :: l e ->  t
> 	toList :: t -> l e
> 
> I'd like to help implementing/ writing it.
> 
> Do you consider this beeing a useful enhancement?

I was looking for such a class just yesterday. I wanted a difference
list over LazyByteString, and it seemed wrong just to rewrite Don
Stewart's DList for byte strings without first having a list class.

I would also like to help implement it.



More information about the Libraries mailing list