Skip to content

GHC allows you to quantify variables over TYPE 'Unlifted (a.k.a, #)

This should be disallowed, so sayeth goldfire:

$ inplace/bin/ghc-stage2 --interactive
GHCi, version 8.1.20160109: http://www.haskell.org/ghc/  :? for help
λ> :set -XKindSignatures 
λ> import GHC.Types
λ> data Wat (a :: TYPE 'Unlifted) = Wat a
λ> :i Wat
data Wat (a :: #) = Wat a       -- Defined at <interactive>:3:1
λ> :set -XMagicHash 
λ> :t Wat 1#
Wat 1# :: Wat GHC.Prim.Int#
λ> :t Wat 'a'#
Wat 'a'# :: Wat GHC.Prim.Char#
Trac metadata
Trac field Value
Version 8.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC goldfire
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information