Unlifted data types

Richard Eisenberg eir at cis.upenn.edu
Wed Sep 9 12:35:04 UTC 2015

On Sep 9, 2015, at 8:28 AM, Simon Peyton Jones <simonpj at microsoft.com> wrote:

> I think it'd be better to have 
> TYPE :: TypeShape -> *
> data TypeShape = Unboxed | Boxed Levity
> data Levity = Lifted | Unlifted

Yes, of course.

> So we really would get very little levity polymorphism ineed.  I think.

That's right. The levity polymorphism is, essentially, only to have a nice type inference story. Once the code gets passed to the back end, the polymorphism would have to be removed. My idea was to use it to allow users to gloss (somewhat) over the ! vs. no-! distinction by having the compiler to the Right Thing during inference.


More information about the ghc-devs mailing list