Unlifted data types

Simon Peyton Jones simonpj at microsoft.com
Wed Sep 9 12:40:27 UTC 2015


|  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.

Can you be more specific?  What does "gloss over" mean?

S

|  -----Original Message-----
|  From: Richard Eisenberg [mailto:eir at cis.upenn.edu]
|  Sent: 09 September 2015 13:35
|  To: Simon Peyton Jones
|  Cc: ghc-devs
|  Subject: Re: Unlifted data types
|  
|  
|  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.
|  
|  Richard


More information about the ghc-devs mailing list