
#10626: Missed opportunity for SpecConstr -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dsc): Just tried with GHC 8.0.2 and 7.10.3; similar problem. By the way, the original source looks like this: {{{ intersperseTest = $$(maybeSimplify $ S.enumFromToNum [|| 1 ||] [|| 1000000 :: Int ||] & S.concatMap (\a -> yield a S.++ yield a) & S.intersperse [|| 42 ||] & S.concatMap yield & S.sum_ & runIdentityE_static ) }}} (WIP library/experiment, trying for something like the [https://hackage.haskell.org/package/streaming streaming] package with robust fusion using typed TH :)) If I change the first `concatMap` to just `concatMap yield` or remove either the `intersperse` or the second `concatMap`, the problem is not present. I've had similar instances where the problem disappears after removing a random part of the pipeline (with that part fusing correctly if I remove a different part). Feels like I'm hitting some size limit rather than a fundamental problem (?) But as mentioned above, I already tried setting various GHC flags to large numbers. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10626#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler