
#14287: Early inlining causes potential join points to be missed -------------------------------------+------------------------------------- Reporter: jheek | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): Another way to make the program faster is to write {{{ sfilter3 :: (a -> Bool) -> Stream s a -> Stream s a sfilter3 pred (Stream step s0) = Stream filterStep s0 where filterStep s = let go s = case step s of Done -> Done Yield x ns | pred x -> Yield x ns | otherwise -> go ns in go s }}} or to perform the transformation described by Simon in #13966. Both leads to precisely the same core as the `INLINE [2]` version. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14287#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler