[GHC] #8634: Relax functional dependency coherence check ("liberal coverage condition")

GHC ghc-devs at haskell.org
Wed Jun 3 01:49:08 UTC 2015


#8634: Relax functional dependency coherence check ("liberal coverage condition")
-------------------------------------+-------------------------------------
        Reporter:  danilo2           |                   Owner:
            Type:  feature request   |                  Status:  new
        Priority:  high              |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.7
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:  #1241, #2247,     |                Blocking:
  #8356, #9103, #9227                |  Differential Revisions:  Phab:D69
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Some thoughts upon returning to this ticket after a long time.

 * Is there a wiki page or similar describing the meaning of functional
 dependencies under `DysfunctionalDependencies`? I think I understand the
 meaning in the case of `class C a b | a -> b`: I think the condition is
 that for any type `a0`, there is at most one ''instance declaration''
 `instance C a[vs] b[vs]` for which `a[vs]` unifies with `a0`, but this
 unification may not fully determine `b[vs]`. But I don't know what it
 means to write a dysfunctional dependency like `class C a b c | a -> b`.
 How does that differ from the dependency `a c -> b`?

 * Would adding `DysfunctionalDependencies` get in the way of some day
 desugaring functional dependencies into type families, and removing the
 fundep solver code? (Is this likely to ever happen anyways?)

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8634#comment:62>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list