> Haskell doesn't seem to allow
> 
> > instance Num (Int->Int) where ...
> 
>  or
> 
> > instance Stringable String where ...

Haskell requires you to write instances of the form

        instance context => T a1..an where ...

where T is a type constructor and a1..an are type variables.

This is a conservative, but sound, design choice.  Haskell 2,
some versions of Hugs, and GHC 3.02 and later, all accept more
instance declarations.

There's extensive discussion in
        http://www.dcs.gla.ac.uk/~simonpj/multi.ps.gz

and a summary of the state of play in
        http://www.dcs.gla.ac.uk/~simonpj/multi-param.html

Simon



Reply via email to