[GHC] #14873: The well-kinded type invariant (in TcType)
GHC
ghc-devs at haskell.org
Wed Jul 11 13:36:25 UTC 2018
#14873: The well-kinded type invariant (in TcType)
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: goldfire
Type: bug | Status: merge
Priority: highest | Milestone: 8.6.1
Component: Compiler (Type | Version: 8.5
checker) |
Resolution: | Keywords: TypeInType
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
I've wondered about this, too. If we had `TcType` separate from `Type`,
then we this would be very easy to find.
I suppose we could smoke it out: put an `ASSERT` in the `typeKind` case
for `TyVarTy` that the tyvar isn't a `TcTyVar`. Do the same with `eqType`.
Then we'd catch (almost) all the cases.
I wonder what the performance implications would be.
(+) We don't have to zonk unnecessarily just to maintain the invariant.
(-) When we do zonk, we don't memorialize this in the type -- only in the
kind.
(-) Is monadic code slower than pure code?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14873#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list