#5895: INLINE pragma doesn't trigger on locally defined function
------------------------------+---------------------------------------------
Reporter: tibbe | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.4.1 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
I have a function on the form
{{{
f = ...g...
where
g = ...h...
h = ...step...
where step
| ... = ...g...
| ... = ...step...
{-# INLINE h #-}
{-# INLINE f #-}
}}}
GHC refuses to inline `h`, even with an explicit `INLINE` pragma. I
realize that `h` is part of a loop, g->h->step->g, but it seems to me that
it should be possible to inline the non-recursive `h` anyway.
I've attached a standalone test case (which is a quite a bit longer.) The
function `f` above corresponds to `filterWithKey` in the test case.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5895>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs