Top-level bindings for unlifted types
Neil Mitchell
ndmitchell at gmail.com
Tue Nov 13 06:06:50 EST 2007
Hi,
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.
Thanks
Neil
More information about the Glasgow-haskell-users
mailing list