[Haskell-cafe] Re: (Chaos) [An interesting toy]

David House dmhouse at gmail.com
Mon May 7 16:50:27 EDT 2007


On 07/05/07, Andrew Coppin <andrewcoppin at btinternet.com> wrote:
> (Anybody know what the difference between GHC.Prim.Double#
> and GHC.Float.Double is?)

It's the difference between unboxed and boxed types. A boxed type's
representation is in fact a pointer to the unboxed type (I think), so
that a Double would be internally represented to a pointer to a
Double#. As a consequence, a Double can be _|_, because this can be
represented by a null pointer. So such luck with unboxed types. So
working with unboxed types is quicker and consumes less memory, but
don't use them in any kind of high level because the lack of a _|_
will bite you sooner or later.

-- 
-David House, dmhouse at gmail.com


More information about the Haskell-Cafe mailing list