Haskell platform proposal: split package

Christian Maeder Christian.Maeder at dfki.de
Mon Jul 23 11:11:19 CEST 2012

Am 21.07.2012 14:30, schrieb Twan van Laarhoven:
> Would the following type work?
>      data Delimiter a
>          = DelimEltPred (a -> Bool)
>          | DelimSublistPred [a -> Bool]
> You can go from the current DelimSublist to DelimSublistPred with just
> `map (==)`. And is the distinction between the DelimEltPred and
> DelimSublistPred then still needed at all?

Does it not make sense then, to reuse the DelimSublistPred variant with 
a singleton list for the DelimEltPred case? (I suppose empty lists must 
be excluded anyway).

    newtype Delimiter a = Delimiter [a -> Bool]


> Twan

More information about the Libraries mailing list