On Wednesday, 2002-10-16, 10:07, CEST, Ashley Yakeley wrote:
> [...]
>
> > Presumably you mean 'instance' not 'class'? A class decl always has
> > a type variable after the =>; thus ...=> C a.
>
> Unless Wolfgang meant
>
> class (Eq (forall a. t a), Monad t) => C t
This is exactly what I me
On Wednesday, 2002-10-16, 09:40, CEST, Simon Peyton-Jones wrote:
> > I want to define something like
> > class (Eq (forall a. T a), Monad T) => C T
> > where the context shall mean that T has to be an instance of Monad
> > and
> > that for every type a the type T a has to be an instance of Eq.
> > class (Eq (forall a. t a), Monad t) => C t
>
> more logically,
>
> class (forall a. Eq (t a), Monad t) => C t
and more usefully,
class (forall a . Eq a => Eq (t a), Monad t) => C t
- Hal
___
Haskell mailing list
[EMAIL PROTECTED]
http://w
At 2002-10-16 01:07, Ashley Yakeley wrote:
> class (Eq (forall a. t a), Monad t) => C t
more logically,
class (forall a. Eq (t a), Monad t) => C t
--
Ashley Yakeley, Seattle WA
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/m
At 2002-10-16 00:40, Simon Peyton-Jones wrote:
>Not currently, but I think it makes sense, and I'll implement it if
>enough people ask.
That's two. FWIW, my pint offer still stands.
>Presumably you mean 'instance' not 'class'? A class decl always has a
>type variable after the =>; thus ...=> C
G'day all.
On Wed, Oct 16, 2002 at 08:40:18AM +0100, Simon Peyton-Jones wrote:
> There aren't many type constructors T for which T a is an equality
> type...
I can think of a few, like IORef. Admittedly I can't think of any that
are also monads.
Cheers,
Andrew Bromage
| I want to define something like
| class (Eq (forall a. T a), Monad T) => C T
| where the context shall mean that T has to be an instance of Monad and
| that for every type a the type T a has to be an instance of Eq.
| Is such a thing possible with some Haskell implementation?
Not currently,