#3123: make INLINE work for recursive definitions (generalized loop peeling/loop
unrolling)
---------------------------------+------------------------------------------
    Reporter:  claus             |        Owner:                  
        Type:  feature request   |       Status:  new             
    Priority:  normal            |    Milestone:  6.12 branch     
   Component:  Compiler          |      Version:  6.11            
    Severity:  normal            |   Resolution:                  
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Comment (by batterseapower):

 Implemented as a compiler plugin (http://github.com/batterseapower/unroll-
 plugin/tree/master). Has some unfortunate limitations:

  * Annotations can only occur on top level things, so we can't unroll
 local definitions
  * Ugly annotation syntax :-)
  * If your functions require dictionaries, the annotated functions
 sometimes don't 'look' recursive before the simplifier / specialiser has
 had a go at them, because they call directly into a recursive worker.
 Workaround: always give your functions monomorphic types! I've tried to
 avoid this by simplifying a bit before we hit the unroller, though.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3123#comment:5>
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

Reply via email to