[GHC] #14993: QuantifiedConstraints and principal types

GHC ghc-devs at haskell.org
Mon Apr 2 21:32:15 UTC 2018


#14993: QuantifiedConstraints and principal types
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.5
      Resolution:                    |             Keywords:
                                     |  QuantifiedConstraints, wipT2893
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):

 In principle yes, but in the `wip/T2893` branch:

 * I deliberately never ''infer' a type with quantified constraints.  It
 seems too easy to infer an elaborate, incomprehensible, and perhaps even
 insoluble, constraint when all that happened was a simple error on the
 programmer's part.

 * The design deliberately has `cls tys` or `tyvar tys` after the `=>` of a
 quantified constraint; not `a ~ Bool`.  There are too many other ways to
 solve equalities!

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


More information about the ghc-tickets mailing list