bindings for unlifted types are allowed in .hs-boot files and .hsig files
The following module compiles without error.
A.hs-boot
---------
{-# LANGUAGE MagicHash -#}
module A where
import GHC.Prim
x :: Int#
===
ghc -c A.hs-boot
I would expect to get a "Top-level unlifted bindings are not allowed." error, as I would with a .hs module.
Similarly
A.hsig
======
{-# LANGUAGE MagicHash #-}
unit U where
signature A where
import GHC.Prim
x :: Int#
===
ghc --backpack -fno-code -fwrite-interface A.hsig
succeeds, where I would expect the same error.
This error is thrown during desugaring, and .hs-boot and .hsig files are not desugared.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.1-rc2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |