summaryrefslogtreecommitdiff
path: root/compiler/coreSyn/CoreArity.hs
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2016-04-20 10:46:41 +0200
committerJoachim Breitner <mail@joachim-breitner.de>2016-04-20 11:08:17 +0200
commitd3d7d01b591163b4f7e08e23b01b258b3b67e9ab (patch)
tree2a2efd985a3cfce55d125c14fcfac9b8bfe4e5b6 /compiler/coreSyn/CoreArity.hs
parent81b14c141dc385dbb0de00ea72217185cfa22a09 (diff)
downloadhaskell-wip/D2128.tar.gz
Implement the state hack without modifiyng OneShotInfowip/D2128
Previously, the state hack would be implemented in mkLocalId, by looking at the type, and setting the OneShot flag accordingly. This patch changes this so that the OneShot flag faithfully represents what our various analyses found out, and the State Hack is implemented by adjusting the accessors, in particular isOneShotBndr and idStateHackOneShotInfo. This makes it easier to understand what's going on in the analyses, and de-clutters core dumps and interface files. I don’t expect any change in behaviour, at least not in non-fringe cases.
Diffstat (limited to 'compiler/coreSyn/CoreArity.hs')
-rw-r--r--compiler/coreSyn/CoreArity.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/coreSyn/CoreArity.hs b/compiler/coreSyn/CoreArity.hs
index cf6cd98b99..59c261bfeb 100644
--- a/compiler/coreSyn/CoreArity.hs
+++ b/compiler/coreSyn/CoreArity.hs
@@ -633,7 +633,7 @@ when saturated" so we don't want to be too gung-ho about saturating!
-}
arityLam :: Id -> ArityType -> ArityType
-arityLam id (ATop as) = ATop (idOneShotInfo id : as)
+arityLam id (ATop as) = ATop (idStateHackOneShotInfo id : as)
arityLam _ (ABot n) = ABot (n+1)
floatIn :: Bool -> ArityType -> ArityType