#5658: Strict bindings are wrongly floated out of case alternatives.
---------------------------------+------------------------------------------
    Reporter:  benl              |       Owner:  benl            
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.2.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  Runtime crash   
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------
Changes (by simonmar):

  * difficulty:  => Unknown


Comment:

 I think of `has_side_effects` as implying `can_fail`, but not vice versa.

  * A primop that is neither `can_fail` nor `has_side_effects` can be
 executed speculatively, any number of times

  * A primop that is marked `can_fail` cannot be executed speculatively,
 but it can be repeated (why would you want to do that?  Perhaps it might
 enable some eta-expansion, if you can prove that the lambda is definitely
 applied at least once.  I guess we don't currently do that).

  * A primop that is marked `has_side_effects` can be neither speculated
 nor repeated; it must be executed exactly the right number of times.

 This is all moot since as you point out we don't currently take advantage
 of `can_fail && !has_side_effects`.

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