Unlifted primop types

Ben Gamari ben at smart-cactus.org
Wed Aug 22 11:45:26 UTC 2018


Simon Peyton Jones <simonpj at microsoft.com> writes:

> |  Huh! It looks like what we currently do for some primops is just use a
> |  totally bogus kind. For example, mkWeak# will happily accept an Int# as
> |  its first argument.
>
> Well, I see
>   primop  MkWeakOp "mkWeak#" GenPrimOp
>      o -> b -> (State# RealWorld -> (# State# RealWorld, c #))
>
> and I believe (from Ben's message) that the "o" means "open type variable",
> which is the old terminology for what we now call levity-polymorphic.
>
Right; currently (largely for historical reasons) we use `o` to
accommodate cases that accept both lifted and unlifted pointers. 

Cheers,

- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180822/1ccef566/attachment.sig>


More information about the ghc-devs mailing list