[GHC] #13821: bindings for unlifted types are allowed in .hs-boot files and .hsig files

#13821: bindings for unlifted types are allowed in .hs-boot files and .hsig files -------------------------------------+------------------------------------- Reporter: duog | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1-rc2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC accepts Unknown/Multiple | invalid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13821 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13821: bindings for unlifted types are allowed in .hs-boot files and .hsig files -------------------------------------+------------------------------------- Reporter: duog | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHC accepts | Test Case: invalid program | typecheck/should_fail/T13821 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * testcase: => typecheck/should_fail/T13821 Comment: Desugaring does seem like a strange time to perform this check. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13821#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13821: bindings for unlifted types are allowed in .hs-boot files and .hsig files
-------------------------------------+-------------------------------------
Reporter: duog | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1-rc2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: GHC accepts | Test Case:
invalid program | typecheck/should_fail/T13821
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari
participants (1)
-
GHC