Hi,
I also think we should do this but it has a lot of ramifications: contant folding in Core, codegen, TH, etc.
Also it will break codes that use primitive types directly, so
maybe it's worth a ghc proposal.
Sylvain
Hi all,
I'm working on making it possible to pack constructor fields [1],example:
```data Foo = Foo {-# UNPACK #-} !Float {-# UNPACK #-} !Int32```
should only require 4 bytes for unpacked `Float` and 4 bytes forunpacked `Int32`, which on 64-bit arch would take just 1 word (insteadof 2 it currently does).
The diff to support packing of fields is in review [2], but to reallytake advantage of it I think we need to introduce new primitive types:- Int{8,16,32}#- Word{8,16,32}#along with some corresponding primops and with some other follow-upchanges like extending `PrimRep`.
Then we could use them in definitions of `Int{8,16,32}` and`Word{8,16,32}` (they're currently just wrapping `Int#` and `Word#`).
Does that sound ok with everyone? (just making sure that this makessense before I invest more time into this :)
Thanks,Michal
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs