[Haskell-cafe] Small question

Stefan O'Rear stefanor at cox.net
Thu Aug 9 14:16:37 EDT 2007


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.

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070809/16c74077/attachment-0001.bin


More information about the Haskell-Cafe mailing list