DefaultSignatures and MultiParamTypeClasses
Reiner Pope
reiner.pope at gmail.com
Mon Jan 16 06:32:03 CET 2012
Hi all,
I just tried, and it appears that the new DefaultSignatures extension doesn't work with multi parameter type classes. For example, when I compile this file:
----
{-# LANGUAGE DefaultSignatures, MultiParamTypeClasses #-}
module Test where
class C a b where
conv :: a -> b
default conv :: D a b => a -> b
conv = dconv
class D a b where
dconv :: a -> b
-----
I get the error message:
-----
/tmp/Test.hs:4:1:
The multi-parameter class `C' cannot have generic methods
In the class declaration for `C'
Failed, modules loaded: none.
-----
Is there a reason for this restriction, or is it merely an accident?
Cheers,
Reiner
More information about the Glasgow-haskell-users
mailing list