[GHC] #8634: Relax functional dependency coherence check ("liberal coverage condition")
GHC
ghc-devs at haskell.org
Tue Jul 22 02:51:39 UTC 2014
#8634: Relax functional dependency coherence check ("liberal coverage condition")
-------------------------------------+-------------------------------------
Reporter: danilo2 | Owner:
Type: feature | Status: new
request | Milestone: 7.10.1
Priority: high | Version: 7.7
Component: Compiler | Keywords:
Resolution: | Operating System: Unknown/Multiple
Differential Revisions: Phab:D69 | Type of failure: None/Unknown
Architecture: | Test Case:
Unknown/Multiple | Blocking:
Difficulty: Unknown |
Blocked By: |
Related Tickets: #1241, |
#2247, #8356, #9103, #9227 |
-------------------------------------+-------------------------------------
Comment (by rwbarton):
You can write your program with `AllowAmbiguousTypes`: add `{-# LANGUAGE
AllowAmbiguousTypes, ScopedTypeVariables #-}` and change `tst` to
{{{
tst :: forall a s b. (Property a s, Property s b) => a -> b
tst a = property (property a :: s)
}}}
Your program could be equally ambiguous if it used GHC 7.6-style/dys-
functional dependencies. The difference is that GHC 7.6 assumes that in
`Property a s`, `a` determines `s` if and only if there is a fundep `a ->
s`, though neither implication is necessarily true.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8634#comment:37>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list