is Unlifted Type == Primitive Type?

Richard Eisenberg rae at richarde.dev
Mon Jan 20 09:58:44 UTC 2020


The recent addition of -XUnliftedNewtypes means that user-defined newtypes (https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0098-unlifted-newtypes.rst <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0098-unlifted-newtypes.rst>) can indeed be unlifted and unboxed. There is also a proposal for more general unlifted data (https://github.com/ghc-proposals/ghc-proposals/pull/265 <https://github.com/ghc-proposals/ghc-proposals/pull/265>).

If the wiki is out of date, do you think you could update it?

Thanks!
Richard

> On Jan 20, 2020, at 9:45 AM, Csaba Hruska <csaba.hruska at gmail.com> wrote:
> 
> Hello,
> 
> According to GHC Wiki <https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/type-type#Classifyingtypes> it seems that only primitive types can be unlifted.
> Is this true in general? (i.e. no user type can be unlifted)
> <image.png>
> Does the Stg to Cmm codegen support compilation for a variable of user defined ADT as unlifted?
> i.e. some analysis proved that it is always a constructor and never a thunk.
> 
> Thanks,
> Csaba
> 
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20200120/bda778ff/attachment.html>


More information about the ghc-devs mailing list