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

GHC ghc-devs at haskell.org
Thu Sep 11 22:13:37 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:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:              |  Related Tickets:  #1241, #2247,
  None/Unknown                       |  #8356, #9103, #9227
             Test Case:              |
              Blocking:              |
Differential Revisions:  Phab:D69    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Situation is this. In comment:30 I show (using Martin's example) that
 lifting the liberal coverage condition (which is what
 `-XDysFunctionalDependencies` proposes to do) means that type inference
 becomes unpredicatable.  On Monday it might succeed, but after a minor
 change to the order in which constraints are examined, on Tuesday it might
 fail. This is not a happy situation.  I did not realise this when I wrote
 comment:14.

 On the other hand, danilo2 (I wish I knew your real name) is saying
 strongly that `=XDysFunctionalDependencies` would really help him.  It is
 possible that his problem could be solved in some other way, but that
 would take a serious investment of time to find out, and danilo2 believes
 not.

 So what to do?  We could treat it like `unsafeCoerce`: you can use it, but
 then you are on your own.  (Maybe it should have an even more discouraging
 name e.g. `-XUnpredicatbleFunctionalDependencies`.)  I worry, though, that
 people will bump into problems, and submit bug reports, ...

 Any other opinions?  danilo2, are you still arguing for this despite the
 difficulties?

 Simon

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


More information about the ghc-tickets mailing list