Unpacking single-field, single-strict-constructor GADTs and existentials
ben at well-typed.com
Tue May 24 08:22:20 UTC 2016
Ben Gamari <ben at well-typed.com> writes:
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 472 bytes
Desc: not available
More information about the ghc-devs