diff options
author | Kavon Farvardin <kavon@farvard.in> | 2018-09-23 15:29:37 -0500 |
---|---|---|
committer | Kavon Farvardin <kavon@farvard.in> | 2018-09-23 15:29:37 -0500 |
commit | 84c2ad99582391005b5e873198b15e9e9eb4f78d (patch) | |
tree | caa8c2f2ec7e97fbb4977263c6817c9af5025cf4 /compiler/stranal/DmdAnal.hs | |
parent | 8ddb47cfcf5776e9a3c55fd37947c8a95e00fa12 (diff) | |
parent | e68b439fe5de61b9a2ca51af472185c62ccb8b46 (diff) | |
download | haskell-wip/T13904.tar.gz |
update to current master againwip/T13904
Diffstat (limited to 'compiler/stranal/DmdAnal.hs')
-rw-r--r-- | compiler/stranal/DmdAnal.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs index 49912413e4..b606804079 100644 --- a/compiler/stranal/DmdAnal.hs +++ b/compiler/stranal/DmdAnal.hs @@ -13,6 +13,8 @@ module DmdAnal ( dmdAnalProgram ) where #include "HsVersions.h" +import GhcPrelude + import DynFlags import WwLib ( findTypeShape, deepSplitProductType_maybe ) import Demand -- All of it @@ -399,7 +401,7 @@ situation actually arises in GHC.IO.Handle.Internals.wantReadableHandle So if the scrutinee is a primop call, we *don't* apply the state hack: - - If is a simple, terminating one like getMaskingState, + - If it is a simple, terminating one like getMaskingState, applying the hack is over-conservative. - If the primop is raise# then it returns bottom, so the case alternatives are already discarded. @@ -642,7 +644,7 @@ dmdAnalRhsLetDown top_lvl rec_flag env let_dmd id rhs Nothing | (bndrs, body) <- collectBinders rhs -> (bndrs, body, mkBodyDmd env body) - env_body = foldl extendSigsWithLam env bndrs + env_body = foldl' extendSigsWithLam env bndrs (body_ty, body') = dmdAnal env_body body_dmd body body_ty' = removeDmdTyArgs body_ty -- zap possible deep CPR info (DmdType rhs_fv rhs_dmds rhs_res, bndrs') @@ -1191,7 +1193,7 @@ extendSigsWithLam env id extendEnvForProdAlt :: AnalEnv -> CoreExpr -> Id -> DataCon -> [Var] -> AnalEnv -- See Note [CPR in a product case alternative] extendEnvForProdAlt env scrut case_bndr dc bndrs - = foldl do_con_arg env1 ids_w_strs + = foldl' do_con_arg env1 ids_w_strs where env1 = extendAnalEnv NotTopLevel env case_bndr case_bndr_sig |