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

GHC ghc-devs at haskell.org
Thu Jan 31 09:20:34 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 simonpj):

 > Why shouldn't the implication constraint be considered part of
 quant_pred_candidates?

 It's always sound to quantify over any constraints you can't solve.  But
 in many cases that'll simply push type errors from the definition site to
 the call site of the function.  There are many constraints we don't
 quantify over as you'll see in `pickQuantifiableConstraints`.

 I think it's better (more explicit, more comprehensible) just to provide a
 type signature.

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


More information about the ghc-tickets mailing list