
#10797: Kind-level functional dependencies are not resolved properly -------------------------------------+------------------------------------- Reporter: danilo2 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by danilo2): Here is even simpler example: {{{ class BaseType (a :: k) (b :: l) | a -> b, k -> l where baseType :: Proxy a -> Proxy b instance {-# OVERLAPPABLE #-} BaseType (( (a :: l -> x) (t :: l)) ) (a :: l -> x) where baseType _ = Proxy }}} error: {{{ Illegal instance declaration for ‘BaseType (a t) a’ The liberal coverage condition fails in class ‘BaseType’ for functional dependency: ‘k -> l’ Reason: lhs type ‘x’ does not determine rhs type ‘l -> x’ In the instance declaration for ‘BaseType (((a :: l -> x) (t :: l))) (a :: l -> x)’ }}} where it seems again, that GHC cannot infer funded between {{{l -> x}}} and {{{l -> x}}}, "thinking" that LHS of funded is {{{x}}} instead of {{{l -> x}}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10797#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler