
#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