I've added it to the test suite!
Simon
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim
| Apple
| Sent: 09 January 2007 01:52
| To: haskell-cafe@haskell.org
| Subject: Re: [Haskell-cafe] Monad Set via GADT
|
| On 1/3/07, Roberto Zunino &l
On 1/3/07, Roberto Zunino <[EMAIL PROTECTED]> wrote:
I tried to define a Set datatype,
with the usual operations, so that it can be made a member of the
standard Monad class.
Also, we can do this with oleg's technique of "Restricted Data Types Now":
http://article.gmane.org/gmane.comp.lang.has
On 1/3/07, Roberto Zunino <[EMAIL PROTECTED]> wrote:
1) Why the first version did not typececk?
2) Why the second one does?
3) If I replace (Teq a w) with (Teq w a), as in
SM :: Ord w => Teq w a -> Set.Set w -> SetM a
then union above does not typecheck! Why? I guess the type variable
unific
To improve my understanding of GADT, I tried to define a Set datatype,
with the usual operations, so that it can be made a member of the
standard Monad class. Here I report on my experiments.
First, I recap the problem. Data.Set.Set can not be made a Monad because
of the Ord constraint on its