#ifdef considered harmful (was: DData)

Ketil Malde ketil+haskell at ii.uib.no
Fri Apr 16 12:53:46 EDT 2004


"Simon Marlow" <simonmar at microsoft.com> writes:

> Most of the time it's unnecessary to use an explicit Int#.  If your Int
> is in a data structure, you can use 
> 
>   {-# UNPACK #-} !Int
> 
> which is portable, and compiles to an unboxed Int in GHC >= 6.2.

Is this different from 
        !Int
and 
        -funbox-strict
?

(I.e., should I change from this to UNPACK pragmas?)

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Libraries mailing list