#1241: Functional dependencies not checked.
-+--
Reporter: guest| Owner:
Type: bug | Status: new
Priority: normal | Milestone: _|_
Component: Compiler (Type checker) |Version: 6.6
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
-+--
Comment (by guest):
The problem is that the class instance {{{F Int b}}} vialotes the
functional dependecy on {{{F}}} and, for this reason, it should be
rejected. This is similar to rejecting an instance {{{F Char Bool}}} when
we already have an instance for {{{F Char Char}}} except that, in this
case, the instance is conflicting with itself.
Relaxing the coverage condition is OK but we still need to check that
instances satisfy the functional dependecies of the class (just like we
need to check that instances satisfy the super classes for a class). I
thought that GHC was supposed to use the dependecy rule (according to
http://hackage.haskell.org/trac/haskell-prime/wiki/FunctionalDependencies)
and I think that in 6.4 this used to work but, I guess, in 6.6 this check
was removed?
-Iavor
--
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1241
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs