Collapsing HsForAllTy, again

Alan & Kim Zimmerman alan.zimm at gmail.com
Thu Apr 9 21:15:15 UTC 2015


With the help of Jan Stolarek I tracked down the HsForAllTy flattening to
 `HsTypes.mk_forall_ty`.

This function takes any nested HsForAllTy's where the top one does not have
a context defined, and collapses them into a single one.

I do not know what the motivation for this is, and if it perhaps speeds up
or simplifies further compilation.

But now that API Annotations have arrived, making sure we do not lose the
annotations for the sub-HsForAllTy  causes significant gymnastics in the
parser [1].

So my question is, is there a good reason to continue doing this, given the
trade-off in parser complexity.

Regards
  Alan

[1]  https://phabricator.haskell.org/D833
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20150409/4f9c504d/attachment.html>


More information about the ghc-devs mailing list