[GHC] #16140: Cannot create type synonym for quantified constraint without ImpredicativeTypes
GHC
ghc-devs at haskell.org
Thu Jan 17 22:30:26 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):
> Do you think we'd be better off not calling checkValidType here?
Yes! If we are going to have `checkTySynRhs` at all, then we should do
all the work there.
This is the commit that added `checkTySynRhs`.
{{{
commit 35c9de7ca053eda472cb446c53bcd2007bfd8394
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Sat Jun 11 23:56:42 2016 +0100
Move the constraint-kind validity check
For type synonyms, we need to check that if the RHS has
kind Constraint, then we have -XConstraintKinds. For
some reason this was done in checkValidType, but it makes
more sense to do it in checkValidTyCon.
I can't remember quite why I made this change; maybe it fixes
a Trac ticket, but if so I forget which. But it's a modest
improvement anyway.
}}}
But calling both makes no sense.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16140#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list