#5059: Pragma to SPECIALISE on value arguments
---------------------------------+------------------------------------------
Reporter: batterseapower | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.4.1
Component: Compiler | Version: 7.0.3
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by ezyang):
It's interesting to note that you can get the desired effect with current
inlining technology if you write your recursive function in particular
way, transforming:
{{{
f opts x = ... f opts ...
}}}
into
{{{
f opts = worker
where worker x = ... worker ...
}}}
But it's not at all obvious that you can always do this transformation,
especially if recursive call to the function uses a different value than
the one you are specializing with. So you in fact do have to make a
judgment call about how much you want to unroll the definition (I think
Max has suggested we only unroll once); a pretty classic partial
evaluation problem, if you ask me. :-)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5059#comment:9>
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