CoreTidy: Don't seq unfoldings
authorBen Gamari <ben@smart-cactus.org>
Tue, 2 May 2017 15:36:47 +0000 (11:36 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 4 May 2017 22:21:54 +0000 (18:21 -0400)
commitb3da6a6c3546562d5c5e83b8af5d3fd04c07e0c1
tree4817266b31bafec00d561567f2012762e97a057d
parent8a2c2476b300969514888cb2084d083f8d18b6b0
CoreTidy: Don't seq unfoldings

Previously we would force uf_is_value and friends to ensure that we didn't
retain a reference to the pre-tidying template, resulting in a space leak.
Instead, we now just reinitialize these fields (despite the fact that they
should not have changed). This may result in a bit more computation, but most of
the time we won't ever evaluate them anyways, so the damage shouldn't be so bad.

See #13564.
compiler/coreSyn/CoreTidy.hs