[GHC] #14845: TypeInType, index GADT by constraint witness
GHC
ghc-devs at haskell.org
Thu May 24 10:17:40 UTC 2018
#14845: TypeInType, index GADT by constraint witness
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: feature request | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 8.5
Resolution: | Keywords: TypeInType
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #13895 | Differential Rev(s): Phab:D4728
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* status: new => patch
* differential: => Phab:D4728
Comment:
Phab:D4728 attempts to provide a better error message when promoting a
data constructor with an unpromotable context.
Note that I didn't attempt to change `checkValidType` in this patch, since
that would require a significant amount of plumbing to check whether
`checkValidType` was being called on a type or a kind. I felt that the
existing error message from `tcInstBinder` (which I tweaked slightly in
this Diff to say "kind" instead of "type") was sufficient.
This patch also doesn't check for type synonyms, as suggested in
comment:15, since that would require changing the checks in `tcInstBinder`
accordingly, and I don't know how to do that. But in any case, this is a
solid improvement over the status quo.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14845#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list