Ticket #5920: 5920.patch

File 5920.patch, 1.2 KB (added by pcapriotti, 3 years ago)
  • compiler/stranal/WwLib.lhs

    From f32d0b53d2605a11a914b38ce6ed2e6599a34d2d Mon Sep 17 00:00:00 2001
    From: Paolo Capriotti <[email protected]>
    Date: Wed, 14 Mar 2012 11:32:39 +0000
    Subject: [PATCH] Do not remove absent RealWorld arguments from workers
     (#5920).
    
    ---
     compiler/stranal/WwLib.lhs |    3 ---
     1 files changed, 0 insertions(+), 3 deletions(-)
    
    diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs
    index 4b18b8b..0282734 100644
    a b import Demand ( Demand(..), DmdResult(..), Demands(..) ) 
    2727import MkCore           ( mkRuntimeErrorApp, aBSENT_ERROR_ID ) 
    2828import MkId             ( realWorldPrimId, voidArgId,  
    2929                          mkUnpackCase, mkProductBox ) 
    30 import TysPrim          ( realWorldStatePrimTy ) 
    3130import TysWiredIn       ( tupleCon ) 
    3231import Type 
    3332import Coercion         ( mkSymCo, splitNewTypeRepCo_maybe ) 
    mk_absent_let arg 
    533532  | Just tc <- tyConAppTyCon_maybe arg_ty 
    534533  , Just lit <- absentLiteralOf tc 
    535534  = Just (Let (NonRec arg (Lit lit))) 
    536   | arg_ty `eqType` realWorldStatePrimTy  
    537   = Just (Let (NonRec arg (Var realWorldPrimId))) 
    538535  | otherwise 
    539536  = WARN( True, ptext (sLit "No absent value for") <+> ppr arg_ty ) 
    540537    Nothing