
9 Aug
2007
9 Aug
'07
2:28 p.m.
On 09/08/07, Stefan O'Rear
On Thu, Aug 09, 2007 at 07:12:12PM +0100, Sebastian Sylvan wrote:
{-#OPTIONS -funbox-strict-fields #-}
data Quad = Quad !Bool !Bool
foo True True = ... foo True False = .... ... etc...
The GHC option just causese GHC to unbox primitive types when they're strict in the data type, and the bangs cause them to be strict.
Unfortunately, Bool is not a sufficiently primitive type for that to work.
Ah good point. Well I'd guess a Word8 would do (might be faster to use a Word32 or Word64 depending on your machine though?). -- Sebastian Sylvan +44(0)7857-300802 UIN: 44640862