Invoke lintUnfolding only on top-level unfoldings (#14430)
authorJoachim Breitner <mail@joachim-breitner.de>
Wed, 8 Nov 2017 03:17:50 +0000 (22:17 -0500)
committerJoachim Breitner <mail@joachim-breitner.de>
Thu, 9 Nov 2017 00:10:18 +0000 (19:10 -0500)
commit803ed036704aa5bab8b0f1fee407e58d82c85393
tree6218421713224e08e9885486002f747942086c32
parent438dd1cbba13d35f3452b4dcef3f94ce9a216905
Invoke lintUnfolding only on top-level unfoldings (#14430)

as nested unfoldings are linted together with the top-level unfolding,
and lintUnfolding does the wrong things for nestd unfoldings that
mention join points.

The easiest way of doing that was to pass a TopLevel flag through
`tcUnfolding`, which is invoked both for top level and nested
unfoldings.

Differential Revision: https://phabricator.haskell.org/D4169
compiler/coreSyn/CoreLint.hs
compiler/iface/TcIface.hs