[GHC] #15791: typeKind confuses Type and Constraint
GHC
ghc-devs at haskell.org
Mon Dec 3 13:51:12 UTC 2018
#15791: typeKind confuses Type and Constraint
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Branch:
Wiki Page: | wip/T15791
-------------------------------------+-------------------------------------
Comment (by simonpj):
Fixed by this commit (though I put the wrong ticket number in the commit
message).
In [changeset:"03d4852658e1b7407abb4da84b1b03bfa6f6db3b/ghc"
03d48526/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="03d4852658e1b7407abb4da84b1b03bfa6f6db3b"
Introduce tcTypeKind, and use it
In the type checker Constraint and * are distinct; and the function
that takes the kind of a type should respect that distinction
(Trac #15971).
This patch implements the change:
* Introduce Type.tcTypeKind, and use it throughout the type
inference engine
* Add new Note [Kinding rules for types] for the kinding
rules, especially for foralls.
* Redefine
isPredTy ty = tcIsConstraintKind (tcTypeKind ty)
(it had a much more complicated definition before)
Some miscellaneous refactoring
* Get rid of TyCoRep.isTYPE, Kind.isTYPEApp,
in favour of TyCoRep.kindRep, kindRep_maybe
* Rename Type.getRuntimeRepFromKind_maybe
to getRuntimeRep_maybe
I did some spot-checks on compiler perf, and it really doesn't
budge (as expected).
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15791#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list