Andreas Klebinger pushed to branch wip/andreask/bomb_out at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/Core/Unfold.hs
    ... ... @@ -574,11 +574,7 @@ sizeExpr opts !bOMB_OUT_SIZE top_args expr
    574 574
       = size_up sizeZero expr
    
    575 575
       where
    
    576 576
         -- (size_up s e) returns `s` plus the size of `e`
    
    577
    -    size_up :: ExprSize NoDiscount -> CoreExpr -> ExprSize WithDiscount
    
    578
    -    size_up TooBig !_ = TooBig
    
    579
    -    size_up (SizeIs !s _ d) _
    
    580
    -      | assert (d == 0) $ s > bOMB_OUT_SIZE
    
    581
    -      = TooBig
    
    577
    +    size_up :: (ExprSize NoDiscount) -> CoreExpr -> ExprSize WithDiscount
    
    582 578
         size_up s (Cast e _)  = size_up s e
    
    583 579
         size_up s (Tick _ e)  = size_up s e
    
    584 580
         size_up s (Type _)    = withDiscount s           -- Types cost nothing