Re: WordX/IntX wrap Word#/Int#?

2017-06-15 Thread Simon Marlow
On 11 June 2017 at 22:44, Joachim Breitner wrote: > Hi, > > Am Sonntag, den 11.06.2017, 10:44 -0400 schrieb Ben Gamari: > > This is certainly one consideration. Another is that you would also > > need to teach the garbage collector to understand closures with sub- > >

Re: WordX/IntX wrap Word#/Int#?

2017-06-13 Thread Michal Terepeta
Just for the record, I've opened: https://ghc.haskell.org/trac/ghc/ticket/13825 to track this. Cheers, Michal On Mon, Jun 12, 2017 at 8:45 PM Michal Terepeta wrote: > Thanks a lot for the replies & links! > > I'll try to finish Simon's diff (and probably ask silly

Re: WordX/IntX wrap Word#/Int#?

2017-06-12 Thread Michal Terepeta
Thanks a lot for the replies & links! I'll try to finish Simon's diff (and probably ask silly questions if I get stuck ;) Cheers, Michal ___ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Re: WordX/IntX wrap Word#/Int#?

2017-06-11 Thread Ben Gamari
Joachim Breitner writes: > Hi, > > Am Sonntag, den 11.06.2017, 10:44 -0400 schrieb Ben Gamari: >> This is certainly one consideration. Another is that you would also >> need to teach the garbage collector to understand closures with sub- >> word-size fields. Currently

Re: WordX/IntX wrap Word#/Int#?

2017-06-11 Thread Joachim Breitner
Hi, Am Sonntag, den 11.06.2017, 10:44 -0400 schrieb Ben Gamari: > This is certainly one consideration. Another is that you would also > need to teach the garbage collector to understand closures with sub- > word-size fields. Currently we can encode whether each field of a > closure is a pointer

Re: WordX/IntX wrap Word#/Int#?

2017-06-11 Thread Ben Gamari
On June 11, 2017 8:03:10 AM EDT, Michal Terepeta wrote: >Hi all, > >I've just noticed that all `WordX` (and `IntX`) data types are >actually implemented as wrappers around `Word#` (and `Int#`). This >probably doesn't matter much if it's stored on the heap (due to

WordX/IntX wrap Word#/Int#?

2017-06-11 Thread Michal Terepeta
Hi all, I've just noticed that all `WordX` (and `IntX`) data types are actually implemented as wrappers around `Word#` (and `Int#`). This probably doesn't matter much if it's stored on the heap (due to pointer indirection and heap alignment), but it also means that: ``` data Foo = Foo {-# UNPACK