#5059: Pragma to SPECIALISE on value arguments
---------------------------------+------------------------------------------
Reporter: batterseapower | Owner:
Type: feature request | Status: new
Priority: normal | Component: Compiler
Version: 7.0.3 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by rl):
This would be quite useful but getting this to work properly seems tricky.
You really want defaultOpts to be inlined into the body of the
specialisation - that's the whole point, after all. On the other hand, you
really don't want it to be inlined into the (f defaultOpts) call because
then the rule won't match. I think you have to give defaultOpts an
INLINE[0] or INLINE[1] pragma to make sure that the specialised function
is optimised but the rule still has a chance to fire. That's not nice,
though, because you have to remember to do that and it isn't very clear
what happens if you don't.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5059#comment:1>
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