#4978: Continuation passing style loop doesn't compile into a loop
---------------------------------+------------------------------------------
    Reporter:  tibbe             |        Owner:              
        Type:  bug               |       Status:  new         
    Priority:  normal            |    Milestone:  7.4.1       
   Component:  Compiler          |      Version:  7.0.1       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by batterseapower):

 Simon's example gets the "correct" arity of 2 if you replace the go_pap
 case in exprIsCheap' with (all (exprIsCheap' good_app) args). Although the
 comment there explicitly warns against doing this, I feel that is the
 right thing to do: why should f get arity 2 here:

 {{{
 f = \a -> let x = map g
               y = map h
           in \b -> .. y .. f ..
 }}}

 But not here:

 {{{
 f = \a -> let y = map (map g)
           in \b -> .. y .. f ..
 }}}

 There is no substantiative difference between the terms, but the current
 analysis treats them differently because it is sensitive to whether
 something is let-bound or occurs as an argument.

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