How do we best make sure {Int,Word,Float,Double} to {Int,Word,Float,Double} conversions stay efficient

Carter Schonwald carter.schonwald at
Fri Dec 14 23:30:32 CET 2012

Yes, thanks Sean for helping clarify!
yes, The TypeLits Nat

I had a discussion on the list with Iavor and others a few months back

and there were some examples and dialogue beyond that with Iavor and SPJ,
but it was off list.

point being: for Word or Int sized instances of Nat singleton, theres a
number of interesting ways having that information used to statically
specialize a numerical computation with some constants is handy, and last
time I asked it sounded like the story for this wasn't fully worked out.

I hope I'm explaining clearly, if not I'll be happy to try to elaborate


On Fri, Dec 14, 2012 at 5:12 PM, Sean Leather <leather at> wrote:

> On Fri, Dec 14, 2012 at 10:47 PM, Ian Lynagh wrote:
> On Fri, Dec 14, 2012 at 04:34:29PM -0500, Carter Schonwald wrote:
>> > A related question I have is that I've some code that will map the
>> > singleton Nats to Ints, and last time I looked into this/ had a chat on
>> the
>> > ghc-users list, it sounded like sometimes having Integer values
>> constructed
>> > in between are unavoidable.  Is that still the case with post 7.6.1 ghc?
>> > (And or, how might I be able to help?)
>> I don't know what a singleton Nat is, but if you mean Word then that's
>> what Johan's been working on.
> I'm guessing Carter means Sing Nat:
> Regards,
> Sean
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Glasgow-haskell-users mailing list