[Haskell-beginners] Meaning of '!' in record defintion? UNPACK?

Erik de Castro Lopo mle+cl at mega-nerd.com
Thu Feb 26 05:42:40 EST 2009

Hi all,

I'm looking at some code that defines a record:

    data Position = 
           Position { posOffset :: {-# UNPACK #-} !Int
                    , posRow :: {-# UNPACK #-} !Int
                    , posColumn :: {-# UNPACK #-} !Int

What does the the exclamation mark mean? And UNPACK?

Thanks in advance.

Erik de Castro Lopo
Microsoft is finally bringing all of its Windows operating system families
under one roof. It will combine all of the features of CE, stability and
support of ME and the speed of NT.
It will be called Windows CEMENT...

More information about the Beginners mailing list