ghci and unboxed ints

Donald Bruce Stewart dons at cse.unsw.edu.au
Thu May 6 09:54:53 EDT 2004


simonpj:
> I don't honestly know!  I could probably find out but it'd take a bit of
> poking
> 
> | -----Original Message-----
> | From: glasgow-haskell-bugs-bounces at haskell.org
> [mailto:glasgow-haskell-bugs-
> | bounces at haskell.org] On Behalf Of Josef Svenningsson
> | Sent: 06 May 2004 14:16
> | To: Simon Peyton-Jones; 'Donald Bruce Stewart'
> | Cc: glasgow-haskell-bugs at haskell.org
> | Subject: RE: ghci and unboxed ints
> | 
> | Just out of curiosity. The number that is displayed, what does it
> mean? My
> | first thought was that it was the address to the allocated thunk. But
> then
> | since everything got the same number that doesn't seem right.
> | 
> | Anyway, it was a fun bug :-)
> | 
> | 	/Josef
> | 
> | > -----Original Message-----
> | > From: Simon Peyton-Jones [mailto:simonpj at microsoft.com]
> | > Sent: den 6 maj 2004 13:31
> | > To: Donald Bruce Stewart; Josef Svenningsson
> | > Cc: glasgow-haskell-bugs at haskell.org
> | > Subject: RE: ghci and unboxed ints
> | >
> | > Fixed now!  Thanks for pointing it out.  The story is that you can
> | > only bind lifted (boxed) things.

Ah, of course. I was a bit confused, as:

        main = putStrLn (show ( let a = 1# in I# a ))

does bind, and compile. But I guess that's because it isn't at the 
top level?

-- Don


More information about the Glasgow-haskell-bugs mailing list