[GHC] #5059: Pragma to SPECIALISE on value arguments

GHC cvs-ghc at haskell.org
Thu Mar 31 15:18:17 CEST 2011


#5059: Pragma to SPECIALISE on value arguments
---------------------------------+------------------------------------------
    Reporter:  batterseapower    |        Owner:              
        Type:  feature request   |       Status:  new         
    Priority:  normal            |    Milestone:              
   Component:  Compiler          |      Version:  7.0.3       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by batterseapower):

 Good thought but it dosen't work. Here is what happens instead:

   1. The call to inline remains in place up to including phase 1,
 presumably because GHC can't inline recursive functions into such
 positions

   2. In phase 0, the call to "inline" is removed and the RHS of f_spec is
 replaced with (f defaultOpts)

   3. The RULE files and rewrites f_spec = f_spec, building a loop. Ooops!

 So at the moment doing this is worse than useless, it actually makes your
 program less defined :-)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5059#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list