[Haskell-cafe] Context for type parameters of type constructors
iakd0 at clusterf.urz.uni-halle.de
Tue Mar 30 10:52:18 EST 2004
On Tue, 30 Mar 2004, Dylan Thurston wrote:
> If you use multi-parameter type classes, then in your instance
> declaration you can specify exactly what requirements you need. For
> > class VectorSpace v a where
> > zero :: v
> > add :: v -> v -> v
> > scale :: a -> v -> v
Multi-parameter type classes aren't Haskell 98, are they? I tried to stay
away from them. I didn't get the point yet why the context for 'data'
is not sufficient for the 'instance' method definition.
More information about the Haskell-Cafe