diff options
author | Sebastian Graf <sebastian.graf@kit.edu> | 2022-10-24 21:10:13 +0200 |
---|---|---|
committer | Sebastian Graf <sebastian.graf@kit.edu> | 2022-10-24 21:10:15 +0200 |
commit | fda71f5377a8905f1e4291aa7175b65a7b0fd445 (patch) | |
tree | a9bc18fe59b793adbf58f43ecdffc22be815a88f | |
parent | f0a90c117ac598504ccb6514de77355de7415c86 (diff) | |
download | haskell-wip/make-exn-div-less-special.tar.gz |
DmdAnal: Make exnDiv behave like topDivwip/make-exn-div-less-special
... except for the purposes of dead code eliminaiton.
As far as DmdAnal is concerned, `topDiv` and `exnDiv` used to differ simply in
their `defaultArgDmd`. NoFib suggests that nothing is lost by making the
`defaultArgDmd` of `exnDiv` return `topDmd` instead of `absDmd`.
(Of course the main purpose of `exnDiv` remains: dead code elimination.)
In the interest of simplification we should make `topDiv` and `exnDiv` as
similar as possible.
-rw-r--r-- | compiler/GHC/Types/Demand.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Types/Demand.hs b/compiler/GHC/Types/Demand.hs index 71693748e0..b4cf78829c 100644 --- a/compiler/GHC/Types/Demand.hs +++ b/compiler/GHC/Types/Demand.hs @@ -1473,7 +1473,7 @@ defaultArgDmd :: Divergence -> Demand defaultArgDmd Dunno = topDmd -- NB: not botDmd! We don't want to mask the precise exception by forcing the -- argument. But it is still absent. -defaultArgDmd ExnOrDiv = absDmd +defaultArgDmd ExnOrDiv = topDmd defaultArgDmd Diverges = botDmd {- Note [Precise vs imprecise exceptions] |