[GHC] #14152: Float exit paths out of recursive functions
GHC
ghc-devs at haskell.org
Fri Apr 6 09:24:04 UTC 2018
#14152: Float exit paths out of recursive functions
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: (none)
Type: task | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
Resolution: | Keywords: JoinPoints
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #14137 #10918 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
Consider
{{{
joinrec j x y z = case x of
True -> <big>
False -> ...j...
}}}
where `<big>` does not mention `j`. It looks to me that you don't even
attempt to turn the whole of `<big>` into an exit point. Instead you
recurse into it. But why don't you? The bigger the better!
{{{
join exit y = <big> in
joinrec j x y z = case x of
True -> exit y
False -> ...j...
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14152#comment:37>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list