[Template-haskell] Representation of unboxed primitives in TH

Ian Lynagh igloo@earth.li
Wed, 30 Apr 2003 01:23:15 +0100


Hi Simon,

Hope you had a good break.

On Tue, Apr 29, 2003 at 08:38:26PM +0100, Simon Peyton-Jones wrote:
> OK, I get it.  You are right.
> 
> But what you have missed is that there's a bug in the existing code for
> repLiteral.  Given an HsInt, dsLit will produce a CoreExpr of type Int
> (not Integer), and that's incompatible with the 'integerL' that'll be
> applied to it.   So you need to do the same thing for HsInt as you've
> done for HsIntPrim.  Presumably this doesn't come up much, or we'd have
> tripped over it already.

In fact, I'm not sure it comes up at all. As far as I can see HsInt is
only generated when building things like derived instances which I don't
think we can see yet (although we probably ought to be able to
ultimately, so it's still worth fixing rather than removing).

> Would you like to check I'm right, and perhaps add a test to
> testsuite/tests/ghc-regress/th/?

I don't think I can make it break, so I'm afraid I can't do this!


Where do we stand on unboxed values? As I understand it Sean wants to
use them but you aren't keen on them due to datastructure bloat.


Thanks
Ian