[GHC] #9227: Coverage Condition cannot be turned off

#9227: Coverage Condition cannot be turned off ------------------------------------+------------------------------------- Reporter: augustss | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- Compile this program {{{ {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} module Bug1 where class C a b | a -> b data A a = A data B a = B instance C (A a) (B b) }}} and observe the error message {{{ Bug1.hs:9:10: Illegal instance declaration for `C (A a) (B b)' The coverage condition fails in class `C' for functional dependency: `a -> b' Reason: lhs type `A a' does not determine rhs type `B b' In the instance declaration for `C (A a) (B b)' }}} Then read manual, sec 7.6.3.3: {{{ Both the Paterson Conditions and the Coverage Condition are lifted if you give the -XUndecidableInstances flag }}} Compile again with -XUndecidableInstances. Observe the exact same error message. Either the compiler or the documentation is wrong. I certainly hope it is the compiler, because it worked in 7.6 and was quite useful. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9227 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9227: Coverage Condition cannot be turned off ----------------------------+---------------------------------------------- Reporter: | Owner: augustss | Status: new Type: bug | Milestone: Priority: normal | Version: 7.8.2 Component: | Keywords: Compiler | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: #1241, #2247, #8356, #8634 Type of failure: | None/Unknown | Test Case: | Blocking: | ----------------------------+---------------------------------------------- Changes (by rwbarton): * related: => #1241, #2247, #8356, #8634 Comment: Without the Coverage Condition, functional dependencies are not actually functional at all. See #1241 for the original change, and #2247, #8356, #8634 (and probably others) for further discussion. Indeed, it looks like the documentation has not been updated. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9227#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9227: Coverage Condition cannot be turned off ----------------------------+---------------------------------------------- Reporter: | Owner: augustss | Status: new Type: bug | Milestone: Priority: normal | Version: 7.8.2 Component: | Keywords: Compiler | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: #1241, #2247, #8356, #8634 Type of failure: | None/Unknown | Test Case: | Blocking: | ----------------------------+---------------------------------------------- Comment (by augustss): That may be so, but in many circumstances the old behaviour worked fine. So there should be a flag to bring it back. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9227#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9227: Coverage Condition cannot be turned off -------------------------------------+------------------------------------- Reporter: augustss | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #1241, #2247, | Differential Revisions: #8356, #8634 | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => duplicate Comment: Simon's response is in https://ghc.haskell.org/trac/ghc/ticket/8634#comment:14 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9227#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC