[GHC] #16252: QuantifiedConstraints: lack of inference really is a problem

GHC ghc-devs at haskell.org
Thu Jan 31 06:10:32 UTC 2019


#16252: QuantifiedConstraints: lack of inference really is a problem
-------------------------------------+-------------------------------------
        Reporter:  lightandlight     |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.6.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by lightandlight):

 I've tried to implement the advice as described: excluding variables from
 generalisation when they appear in un-quantifiable constraints (collecting
 said variables in `approximateWC`, and removing them from `qtvs` in
 `simplifyInfer`). I now have an escaped skolem error.

 I think this is the relevant portion of the trace:

 {{{
   {f1_a26[sk:1], f_a2c[sk:2]}
   g_ah :: forall (a :: (* -> *) -> *).
           a f_a2c[sk:2] -> a f_a2c[sk:2] -> Bool,
   eqA'_a28 :: a_a27[sk:1] f_a26[sk:1]
               -> a_a27[sk:1] f_a26[sk:1] -> Bool,
   eqA :: forall (f :: * -> *) (a :: (* -> *) -> *).
          (forall x. Eq x => Eq (f x)) =>
          a f -> a f -> Bool,
 }}}

 Is it likely that I've forgotten some important call?

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


More information about the ghc-tickets mailing list