|
RE: ghci and unboxed ints: msg#00020lang.haskell.glasgow.bugs
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@xxxxxxxxxxx [mailto:glasgow-haskell-bugs- | bounces@xxxxxxxxxxx] On Behalf Of Josef Svenningsson | Sent: 06 May 2004 14:16 | To: Simon Peyton-Jones; 'Donald Bruce Stewart' | Cc: glasgow-haskell-bugs@xxxxxxxxxxx | 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@xxxxxxxxxxxxx] | > Sent: den 6 maj 2004 13:31 | > To: Donald Bruce Stewart; Josef Svenningsson | > Cc: glasgow-haskell-bugs@xxxxxxxxxxx | > Subject: RE: ghci and unboxed ints | > | > Fixed now! Thanks for pointing it out. The story is that you can only | > bind lifted (boxed) things. | > | > Simon | > | > | -----Original Message----- | > | From: glasgow-haskell-bugs-bounces@xxxxxxxxxxx | > [mailto:glasgow-haskell-bugs- | > | bounces@xxxxxxxxxxx] On Behalf Of Donald Bruce Stewart | > | Sent: 04 May 2004 11:58 | > | To: Josef Svenningsson | > | Cc: glasgow-haskell-bugs@xxxxxxxxxxx | > | Subject: Re: ghci and unboxed ints | > | | > | josefs: | > | > Hi, | > | > | > | > I just played randomly with ghci for a while and encountered the | > following | > | > rather odd behaviour: | > | > | > | > Prelude> :m GHC.Base | > | > Prelude GHC.Base> let a = 1# +# 2# | > | > Prelude GHC.Base> show (I# a) | > | > "18345984" | > | > | > | > The number shown is the one I got when running on Solaris. I get a | > | > different one when running on Windows. It doesn't matter which | > numbers I | > | > add, the same number is always shown. | > | > | > | > Reproducible with 6.2 and 6.2.1. | > | | > | I don't know what the issue is, but it is interesting: | > | | > | Prelude> :m GHC.Base | > | Prelude GHC.Base> case 1# +# 2# of a -> show (I# a) | > | "3" | > | Prelude GHC.Base> let a = 1# +# 2# | > | Prelude GHC.Base> show (I# a) | > | "1085417808" | > | | > | $ ghci --version | > | The Glorious Glasgow Haskell Compilation System, version 6.3.20040202 | > | | > | -- Don | > | _______________________________________________ | > | Glasgow-haskell-bugs mailing list | > | Glasgow-haskell-bugs@xxxxxxxxxxx | > | http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs | | _______________________________________________ | Glasgow-haskell-bugs mailing list | Glasgow-haskell-bugs@xxxxxxxxxxx | http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: ghci and unboxed ints, Josef Svenningsson |
|---|---|
| Next by Date: | Re: ghci and unboxed ints, Donald Bruce Stewart |
| Previous by Thread: | RE: ghci and unboxed ints, Josef Svenningsson |
| Next by Thread: | Re: ghci and unboxed ints, Donald Bruce Stewart |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |