summaryrefslogtreecommitdiff
path: root/compiler/stgSyn
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2011-09-23 09:57:42 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2011-09-23 09:57:42 +0100
commit488e21c8cf07340c4d2f86f8177825a321cb312d (patch)
treebee6beca864278f07500d23c98073db1277af649 /compiler/stgSyn
parentf3c7ed721133d53f81d945ecb737a77c2ef6ef73 (diff)
downloadhaskell-488e21c8cf07340c4d2f86f8177825a321cb312d.tar.gz
Make a new type synonym CoreProgram = [CoreBind]
and comment its invariants in Note [CoreProgram] in CoreSyn I'm not totally convinced that CoreProgram is the right name (perhaps CoreTopBinds might better), but it is useful to have a clue that you are looking at the top-level bindings. This is only a matter of a type synonym change; no deep refactoring here.
Diffstat (limited to 'compiler/stgSyn')
-rw-r--r--compiler/stgSyn/CoreToStg.lhs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/stgSyn/CoreToStg.lhs b/compiler/stgSyn/CoreToStg.lhs
index 1ebb564928..1705f0e60e 100644
--- a/compiler/stgSyn/CoreToStg.lhs
+++ b/compiler/stgSyn/CoreToStg.lhs
@@ -140,7 +140,7 @@ for x, solely to put in the SRTs lower down.
%************************************************************************
\begin{code}
-coreToStg :: PackageId -> [CoreBind] -> IO [StgBinding]
+coreToStg :: PackageId -> CoreProgram -> IO [StgBinding]
coreToStg this_pkg pgm
= return pgm'
where (_, _, pgm') = coreTopBindsToStg this_pkg emptyVarEnv pgm
@@ -153,7 +153,7 @@ coreExprToStg expr
coreTopBindsToStg
:: PackageId
-> IdEnv HowBound -- environment for the bindings
- -> [CoreBind]
+ -> CoreProgram
-> (IdEnv HowBound, FreeVarsInfo, [StgBinding])
coreTopBindsToStg _ env [] = (env, emptyFVInfo, [])