diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-12-22 12:22:47 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-12-23 13:10:22 +0000 |
commit | 75e8c305a497ec5ad3e5a5d9ff73bbf6f7a8a000 (patch) | |
tree | e26f8b779bd8dc8eef764f73e02dcf58ea0b5170 /compiler/coreSyn/CoreTidy.hs | |
parent | 793ddb6574dcb62b4b74cd6fa13c77a4117ea76d (diff) | |
download | haskell-75e8c305a497ec5ad3e5a5d9ff73bbf6f7a8a000.tar.gz |
Propagate evaluated-ness a bit more faithfully
This was provoked by Trac #13027.
The fix in Simplify actually cures the reported bug; see
Note [Case binder evaluated-ness] in Simplify.
The fix in CoreTidy looks like an omission that I fixed while I
was at it.
Diffstat (limited to 'compiler/coreSyn/CoreTidy.hs')
-rw-r--r-- | compiler/coreSyn/CoreTidy.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/coreSyn/CoreTidy.hs b/compiler/coreSyn/CoreTidy.hs index 000a8c5d88..7f82bece17 100644 --- a/compiler/coreSyn/CoreTidy.hs +++ b/compiler/coreSyn/CoreTidy.hs @@ -205,6 +205,8 @@ tidyLetBndr rec_tidy_env env@(tidy_env, var_env) (id,rhs) `setUnfoldingInfo` new_unf new_unf | isStableUnfolding old_unf = tidyUnfolding rec_tidy_env old_unf old_unf + | isEvaldUnfolding old_unf = evaldUnfolding + -- See Note [Preserve evaluatedness] | otherwise = noUnfolding old_unf = unfoldingInfo old_info in |