give equal rights to types and classes! :)

Johannes Waldmann waldmann at
Tue Jan 31 09:34:44 EST 2006

Bulat Ziganshin wrote:

> instead of writing 
> foo :: (Num a, Monad m) => a -> m ()
> allow to write
> foo :: Num -> Monad ()

as has been noted, that would be special treatment
for unary type classes with argument of kind *.

Also, *if* we want such a shorthand, it is not clear whether we want
existential or forall typing per default. Referring to your example,
the "foo" function must be able to return a value in *each* monad
that the caller specifies at the call site, while we were discussing
functions that make their own choice of returning *some* monad instance.

Best regards,
-- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --
---- -------

More information about the Haskell-prime mailing list