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

Thomas Davie tom.davie at gmail.com
Thu Feb 26 06:23:17 EST 2009

On 26 Feb 2009, at 12:07, Colin Paul Adams wrote:

>>>>>> "Thomas" == Thomas Davie <tom.davie at gmail.com> writes:
>    Thomas> The {-# UNPACK #-} tells the compiler that it can unpack
>    Thomas> the Int – meaning that a Position will be neatly packed
>    Thomas> into 12 bytes.
> What would be the difference if there was no UNPACK pragma?

The tag in the Ints would be included in the structure created, with  
UNPACK, they would not.


More information about the Beginners mailing list