Unpacking single-field, single-strict-constructor GADTs and existentials

Ben Gamari ben at well-typed.com
Tue May 24 08:22:20 UTC 2016


Ben Gamari <ben at well-typed.com> writes:

snip

> As far as I understand as long as the existentially-quantified argument
> is unconstrained (therefore there is no need to carry a dictionary) and
> of kind * (therefore has a uniform representation) there is no reason
> why unpacking shouldn't be possible.
>
To clarify, as pointed out in #10016 it should also be possible to
unpack in the constrained case. You merely need to retain a spot in the
datacon's representation to place the dictionary.

I hope this helps.

Cheers,

- Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20160524/9e902c3f/attachment-0001.sig>


More information about the ghc-devs mailing list