[Haskell] Fundep broken in GHC 6.6
simonpj at microsoft.com
Fri Jan 5 12:04:56 EST 2007
I just applied this rule
In this case the type of newBoard is
newBoard :: (Game b mv e, MonadStaet b m) => m ()
Following the rules in that manual section, this type sig is (now) ok. Does that answer your qn
| -----Original Message-----
| From: sefer.org at gmail.com [mailto:sefer.org at gmail.com] On Behalf Of Yitzchak Gale
| Sent: 03 January 2007 22:26
| To: Simon Peyton-Jones
| Cc: GHC users
| Subject: Re: [Haskell] Fundep broken in GHC 6.6
| 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.
| Thank you!
| 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