[Haskell-cafe] Operator #

Daniel Fischer daniel.is.fischer at googlemail.com
Thu Dec 9 21:25:39 CET 2010


On Thu, Dec 9, 2010 at 8:31 PM, c8h10n4o2 <asaferibeiro4 at ymail.com> wrote:

>
> What does # mean in this code ? (from Data.List)
>
>
It's a "magic hash" denoting here on the one hand unboxed machine ints (0#)
and on the other the constructor wrapping such a raw machine int to a
Haskell boxed Int (I#). GHC uses the magic hash to mark raw unboxed stuff
(which you'll rarely need to use). In the libraries, sometimes using the raw
machine data types (Int#, Word#, Double#, Float# and a few more) is needed
for better performance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20101209/237e8d88/attachment.htm>


More information about the Haskell-Cafe mailing list