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

GHC ghc-devs at haskell.org
Tue Jun 13 01:24:07 UTC 2017


#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


More information about the ghc-tickets mailing list