[Haskell] Fundep broken in GHC 6.6

Simon Peyton-Jones simonpj at microsoft.com
Wed Jan 3 11:09:07 EST 2007


[redirecting to ghc users]

Actually this didn't work in 6.4.2 either!  (Though it did in 6.4, for reasons I have not investigated.)

Indeed I think your reasoning is correct.  GHC tries to be pretty relaxed about reporting ambiguous types, which is what this amounts to really.

I have committed a fix to the HEAD that relaxes the condition, and allows this program.  It should appear in 6.6.1 also.

Thanks for the report

Simon

| -----Original Message-----
| From: haskell-bounces at haskell.org [mailto:haskell-bounces at haskell.org]
| On Behalf Of dpus
| Sent: 12 November 2006 19:36
| To: haskell at haskell.org
| Subject: [Haskell] Fundep broken in GHC 6.6
|
| Hi,
|
| The following class declaration worked in GHC 6.4.
| I recently upgraded to 6.6 (following Debian), and
| now it is broken.
|
| 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.
| And this worked fine in GHC 6.4. But GHC 6.6
| complains:
|
|     The class method `newBoard'
|     mentions none of the type variables of the class Game b mv e
|     When checking the class method: newBoard :: m ()
|     In the class declaration for `Game'
|
| Any ideas?
|
| Thanks,
| Yitz
| _______________________________________________
| Haskell mailing list
| Haskell at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell


More information about the Glasgow-haskell-users mailing list