[Haskell] Fundep broken in GHC 6.6
gale at sefer.org
Wed Jan 3 17:26:09 EST 2007
On 12 November 2006 I wrote (on the haskell list):
>> class Error e => Game b mv e | b -> mv e where
>> newBoard :: MonadState b m => m ()
>> Since MonadState has the fundep m -> b, the type
>> of newBoard fully specifies all of the class parameters....
>> But GHC 6.6 complains...
Simon Peyton-Jones wrote:
> I have committed a fix to the HEAD that relaxes the
> condition, and allows this program.
> It should appear in 6.6.1 also.
Am I correct to assume that this fix only applies to the
specific case of unspecified class parameters in
method declarations? And not any of the other cases
where fundeps on class constraints resolve type ambiguity
but are ignored by GHC, such as instance declarations?
Does the fix actually look at the fundeps in the class
constraint on the method, or just relax the
requirement that all class parameters be specified in
every method? If it is the latter, as I suspect, then is
the requirement always relaxed, or only when there is
a class constraint on the method?
More information about the Glasgow-haskell-users