Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Twan van Laarhoven <twanvl <at> gmail.com>
Subject: Re: Haskell platform proposal: split package
Newsgroups: gmane.comp.lang.haskell.libraries
Date: Saturday 21st July 2012 12:30:10 UTC (over 5 years ago)
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
 
CD: 3ms