[GHC] #9725: Constraint deduction failure

GHC ghc-devs at haskell.org
Sat Oct 25 22:49:23 UTC 2014


#9725: Constraint deduction failure
-------------------------------------+-------------------------------------
              Reporter:  heisenbug   |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.3
  (Type checker)                     |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:  GHC         |  Related Tickets:
  rejects valid program              |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 The thread starting at http://www.haskell.org/pipermail/glasgow-haskell-
 users/2013-December/024466.html may be relevant. In short, GHC does not
 decompose `f x ~ g y` into `f ~ g, x ~ y` unless it knows already that `f`
 and `g` (or equivalently `x` and `y`) have the same kind.

 It seems to me that GHC should be able to ''conclude'' from `f x ~ g y`
 that `f` and `g` have the same kind, but maybe it has no way to represent
 this?

 I think there is a related Trac ticket also, but I couldn't find it.

 Maybe adding kind annotations for some of the type variables involved
 would help?

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


More information about the ghc-tickets mailing list