[GHC] #16140: Cannot create type synonym for quantified constraint without ImpredicativeTypes

GHC ghc-devs at haskell.org
Thu Jan 17 08:52:36 UTC 2019


#16140: Cannot create type synonym for quantified constraint without
ImpredicativeTypes
-------------------------------------+-------------------------------------
        Reporter:  Ashley Yakeley    |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.6.3
      Resolution:                    |             Keywords:
                                     |  QuantifiedConstraints,
                                     |  ImpredicativeTypes
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > Certain programs no longer need QuantifiedConstraints to typecheck, even
 though they should

 Aha!  That is easily dealt with.  Now predicates have their own validity
 checker, `check_pred_ty`.  So we can put the quantified-constraint check
 in the `ForAllPred` branch of the `classifyPredType` case analysis; and
 nowhere else.  We don't need to monkey with the rank anymore!

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


More information about the ghc-tickets mailing list