[GHC] #10570: Too restrictive liberate coverage condition

#10570: Too restrictive liberate coverage condition -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Hello! Let's look at this small example: {{{haskell class ConsByIdx2 x a m cls | x -> m where consByIdx2 :: x -> a -> m cls instance ConsByIdx2 Int a Proxy cls where consByIdx2 _ _ = Proxy }}} It fails to compile with the following error: {{{haskell Illegal instance declaration for ‘ConsByIdx2 Int a Proxy cls’ The liberal coverage condition fails in class ‘ConsByIdx2’ for functional dependency: ‘x -> m’ Reason: lhs type ‘Int’ does not determine rhs type ‘Proxy’ In the instance declaration for ‘ConsByIdx2 Int a Proxy cls’ }}} But Int determines the Proxy in a nice way. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10570 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10570: Too restrictive liberate coverage condition -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Description changed by danilo2: Old description:
Hello! Let's look at this small example:
{{{haskell class ConsByIdx2 x a m cls | x -> m where consByIdx2 :: x -> a -> m cls
instance ConsByIdx2 Int a Proxy cls where consByIdx2 _ _ = Proxy }}}
It fails to compile with the following error:
{{{haskell Illegal instance declaration for ‘ConsByIdx2 Int a Proxy cls’ The liberal coverage condition fails in class ‘ConsByIdx2’ for functional dependency: ‘x -> m’ Reason: lhs type ‘Int’ does not determine rhs type ‘Proxy’ In the instance declaration for ‘ConsByIdx2 Int a Proxy cls’ }}}
But Int determines the Proxy in a nice way.
New description: Hello! Let's look at this small example: {{{ class ConsByIdx2 x a m cls | x -> m where consByIdx2 :: x -> a -> m cls instance ConsByIdx2 Int a Proxy cls where consByIdx2 _ _ = Proxy }}} It fails to compile with the following error: {{{ Illegal instance declaration for ‘ConsByIdx2 Int a Proxy cls’ The liberal coverage condition fails in class ‘ConsByIdx2’ for functional dependency: ‘x -> m’ Reason: lhs type ‘Int’ does not determine rhs type ‘Proxy’ In the instance declaration for ‘ConsByIdx2 Int a Proxy cls’ }}} But Int determines the Proxy in a nice way. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10570#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10570: Too restrictive liberate coverage condition -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by danilo2): Oh, I just discovered it was caused by the -XPolyKinds flag. This ticket is no longer valid in this situation! :) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10570#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10570: Too restrictive liberate coverage condition -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by danilo2): * status: new => closed * resolution: => invalid -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10570#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10570: Terrible error message with fundeps and PolyKinds -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by simonpj): * status: closed => new * resolution: invalid => Comment: I'm going to re-open because the error message is so terrible. It should jolly well mention kinds, suggest `-fprint-explicit-kinds` etc -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10570#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10570: Terrible error message with fundeps and PolyKinds
-------------------------------------+-------------------------------------
Reporter: danilo2 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#10570: Terrible error message with fundeps and PolyKinds -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10570#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10570: Terrible error message with fundeps and PolyKinds -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.10.1 Resolution: fixed | Keywords: FunDeps Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * keywords: => FunDeps -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10570#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC