[Haskell-cafe] UNPACK multiple constructors

Louis Wasserman wasserman.louis at gmail.com
Wed Mar 18 14:10:55 EDT 2009


{-# UNPACK #-} is specified to work on single-constructor types, but would
there be advantages to, for instance, compiling

data BinTree e = Node e {-# UNPACK #-} !(Maybe (BinTree e)) {-# UNPACK #-}
!(Maybe (BinTree e))

into four constructors, one for each combination of Maybe constructors?
 Thoughts?

Louis Wasserman
wasserman.louis at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090318/02a6cfc0/attachment.htm


More information about the Haskell-Cafe mailing list