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

GHC ghc-devs at haskell.org
Mon Jul 21 14:56:54 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 sulzmann):

 You should be fine in the situation you describe above. The type
 inferencer is faced with a single constraint

 CText X t

 for some t which is then reduced to t = m Int, Monad m

 In my example I assume two occurrences of method f which result in

 F [a] [b], F[a] c

 This leads then to a conflict between the FD and the instance rule. Hence,
 we find two distinct final constraint stores (1) and (2).

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


More information about the ghc-tickets mailing list