
#12803: Functional dependencies and type families -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by simonpj: @@ -17,0 +17,2 @@ + + I realised this when investigating #10778. New description: Consider {{{ type family F a :: * class C a b | a -> b instance C p (F q) => C p [q] }}} Is the instance decl OK under the liberal coverage condition? That is, does `(C t [s1], C t [s2])` mean that `(s1 ~ s2)`? NO! The context of the instance declaration means that `p -> F q` but that does not imply `p -> q` unless `F` is injective! So this program is wrongly accepted. I realised this when investigating #10778. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12803#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler