Top-level bindings for unlifted types

Neil Mitchell ndmitchell at
Tue Nov 13 06:06:50 EST 2007


The following program:

{-# OPTIONS_GHC -fglasgow-exts #-}
module Test() where
import GHC.Base
test = realWorld#

gives the error message:

    Top-level bindings for unlifted types aren't allowed:
        { test = realWorld# }

Changing to test _ = realWorld# works fine.

The question is why are these bindings disallowed? Reading the
"Unboxed values as first class citizens" paper I can't see it listed
as a restriction.



More information about the Glasgow-haskell-users mailing list