
21 Jul
2012
21 Jul
'12
8:30 a.m.
On 2012-07-21 02:34, Brent Yorgey wrote:
You are right, actually, only ExistentialQuantification is necessary, as long as we also stop using GADT syntax. I didn't realize before that this syntax is accepted:
{-# LANGUAGE ExistentialQuantification #-}
data Delimiter a = DelimEltPred (a -> Bool) | Eq a => DelimSublist [a]
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? Twan