X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FcoreSyn%2FCoreUnfold.lhs;h=46f2ba2015f5332bd9941e19d8d81e3926f3f0e4;hb=387a411e5d6478249de6872c283f2df78ef83bf4;hp=90463419c41e30bd70ed39842c9c35047afc921d;hpb=13a428caa18deb2805e307cbe7a99fa9f09c13a4;p=ghc-hetmet.git diff --git a/ghc/compiler/coreSyn/CoreUnfold.lhs b/ghc/compiler/coreSyn/CoreUnfold.lhs index 9046341..46f2ba2 100644 --- a/ghc/compiler/coreSyn/CoreUnfold.lhs +++ b/ghc/compiler/coreSyn/CoreUnfold.lhs @@ -56,9 +56,10 @@ import PrelNames ( hasKey, buildIdKey, augmentIdKey ) import Bag import FastTypes import Outputable +import Util #if __GLASGOW_HASKELL__ >= 404 -import GlaExts ( fromInt, Int# ) +import GLAEXTS ( Int# ) #endif \end{code} @@ -297,7 +298,7 @@ sizeExpr bOMB_OUT_SIZE top_args expr | fun `hasKey` augmentIdKey = augmentSize | otherwise = case globalIdDetails fun of - DataConId dc -> conSizeN dc (valArgCount args) + DataConWorkId dc -> conSizeN dc (valArgCount args) FCallId fc -> sizeN opt_UF_DearOp PrimOpId op -> primOpSize op (valArgCount args) @@ -591,7 +592,7 @@ callSiteInline dflags active_inline inline_call occ id arg_infos interesting_con -- If (not in_lam) && one_br then PreInlineUnconditionally -- should have caught it, shouldn't it? Unless it's a top -- level thing. - not (null arg_infos) || interesting_cont + notNull arg_infos || interesting_cont | otherwise = case guidance of @@ -669,7 +670,7 @@ computeDiscount n_vals_wanted arg_discounts res_discount arg_infos result_used -- Discount of 1 for each arg supplied, because the -- result replaces the call round (opt_UF_KeenessFactor * - fromInt (arg_discount + result_discount)) + fromIntegral (arg_discount + result_discount)) where arg_discount = sum (zipWith mk_arg_discount arg_discounts arg_infos)