Converting unboxed sum types in StgCmm

Ryan Newton rrnewton at gmail.com
Mon Sep 14 14:27:23 UTC 2015


>
>
>    -
>    data RepType = UbxTupleRep [UnaryType]
>        | UbxSumRep [UnaryType]
>        | UnaryRep UnaryType
>
> Not, fully following, but ... this reptype business is orthogonal to
whether you add a normal type to the STG level that models anonymous,
untagged unions, right?

That is, when using Any for pointer types, they could use indicative
phantom types, like "Any (Union Bool Char)", even if there's not full
support for doing anything useful with (Union Bool Char) by itself.  Maybe
the casting machinery could greenlight a cast from Any (Union Bool Char) to
Bool at least?

There's already the unboxed union itself, (|# #|) , but that's different
than a pointer to a union of types...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20150914/9155eb51/attachment.html>


More information about the ghc-devs mailing list