X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FTidyPgm.lhs;h=131b6175b30511f86c99fed3ca02a6af4ccca70c;hb=9fddc2160c524d4fefb9fc8a42704f812aef7bf3;hp=1f65d212e67aac414c0f64341e31250fc8c683ce;hpb=0cdde9d7cdad657a1d0841b39410774801c69556;p=ghc-hetmet.git diff --git a/compiler/main/TidyPgm.lhs b/compiler/main/TidyPgm.lhs index 1f65d21..131b617 100644 --- a/compiler/main/TidyPgm.lhs +++ b/compiler/main/TidyPgm.lhs @@ -817,7 +817,7 @@ tidyWorker _tidy_env _show_unfold NoWorker = NoWorker tidyWorker tidy_env show_unfold (HasWorker work_id wrap_arity) | show_unfold = HasWorker (tidyVarOcc tidy_env work_id) wrap_arity - | otherwise = WARN( True, ppr work_id ) NoWorker + | otherwise = NoWorker -- NB: do *not* expose the worker if show_unfold is off, -- because that means this thing is a loop breaker or -- marked NOINLINE or something like that @@ -825,8 +825,12 @@ tidyWorker tidy_env show_unfold (HasWorker work_id wrap_arity) -- then you can make the simplifier go into an infinite loop, because -- in effect the unfolding is exposed. See Trac #1709 -- - -- Mind you, it probably should not be w/w'd in the first place; - -- hence the WARN + -- You might think that if show_unfold is False, then the thing should + -- not be w/w'd in the first place. But a legitimate reason is this: + -- the function returns bottom + -- In this case, show_unfold will be false (we don't expose unfoldings + -- for bottoming functions), but we might still have a worker/wrapper + -- split (see Note [Worker-wrapper for bottoming functions] in WorkWrap.lhs \end{code} %************************************************************************