[GHC] #12803: Functional dependencies and type families
GHC
ghc-devs at haskell.org
Fri Nov 4 10:08:27 UTC 2016
#12803: Functional dependencies and type families
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
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.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12803>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list