Commit 922805b2 authored by simonpj's avatar simonpj

[project @ 2002-03-20 11:24:42 by simonpj]

Unravel module loop again (tested this time; sorry)
parent efaab402
......@@ -47,16 +47,22 @@ then
then
CoreLint( CoreUtils )
OccurAnal (CoreUtils.exprIsTrivial)
CoreTidy (CoreUtils.exprArity )
then
CoreUnfold (OccurAnal.occurAnalyseGlobalExpr)
then
CoreTidy (CoreUnfold.noUnfolding)
Subst (Unfolding, CoreFVs)
Generics (mkTopUnfolding)
Subst (CoreUnfold.Unfolding, CoreFVs)
Generics (CoreUnfold.mkTopUnfolding)
then
Rules (Unfolding, CoreTidy.tidyIdRules)
MkId (CoreUnfold.mkUnfolding, Subst, Rule.addRule)
Rules (CoreUnfold.Unfolding, PprCore.pprTidyIdRules)
then
MkId (CoreUnfold.mkUnfolding, Subst, Rules.addRule)
then
PrelInfo (MkId)
HscTypes( Rules.RuleBase )
---------------- END OF INFRASTRUCTURE --------------------
then
CoreTidy (HscTypes.PersistentCompilerState)
This diff is collapsed.
......@@ -16,7 +16,7 @@ module HscMain ( HscResult(..), hscMain,
#ifdef GHCI
import Interpreter
import ByteCodeGen ( byteCodeGen )
import CoreTidy ( tidyCoreExpr )
import TidyPgm ( tidyCoreExpr )
import CorePrep ( corePrepExpr )
import Rename ( renameStmt, renameRdrName, slurpIface )
import RdrName ( rdrNameOcc, setRdrNameOcc )
......@@ -59,7 +59,7 @@ import Desugar
import Flattening ( flatten, flattenExpr )
import SimplCore
import CoreUtils ( coreBindsSize )
import CoreTidy ( tidyCorePgm )
import TidyPgm ( tidyCorePgm )
import CorePrep ( corePrepPgm )
import StgSyn
import CoreToStg ( coreToStg )
......
This diff is collapsed.
......@@ -19,9 +19,8 @@ import CoreSyn -- All of it
import OccurAnal ( occurAnalyseRule )
import CoreFVs ( exprFreeVars, ruleRhsFreeVars, ruleLhsFreeIds )
import CoreUnfold ( isCheapUnfolding, unfoldingTemplate )
import CoreTidy ( tidyIdRules )
import CoreUtils ( eqExpr )
import PprCore ( pprIdRules )
import CoreTidy ( pprTidyIdRules )
import Subst ( Subst, InScopeSet, mkInScopeSet, lookupSubst, extendSubst,
substEnv, setSubstEnv, emptySubst, isInScope, emptyInScopeSet,
bindSubstList, unBindSubstList, substInScope, uniqAway
......@@ -630,6 +629,5 @@ extendRuleBase (RuleBase rule_ids rule_fvs) (id, rule)
-- locally defined ones!!
pprRuleBase :: RuleBase -> SDoc
pprRuleBase (RuleBase rules _) = vcat [ pprIdRules (tidyIdRules id)
| id <- varSetElems rules ]
pprRuleBase (RuleBase rules _) = vcat [ pprTidyIdRules id | id <- varSetElems rules ]
\end{code}
......@@ -14,11 +14,10 @@ import CoreSyn
import CoreLint ( showPass, endPass )
import CoreUtils ( exprType, eqExpr, mkPiTypes )
import CoreFVs ( exprsFreeVars )
import CoreTidy ( tidyIdRules )
import CoreTidy ( pprTidyIdRules )
import WwLib ( mkWorkerArgs )
import DataCon ( dataConRepArity )
import Type ( tyConAppArgs )
import PprCore ( pprIdRules )
import Id ( Id, idName, idType, idSpecialisation,
isDataConId_maybe,
mkUserLocal, mkSysLocal )
......@@ -182,7 +181,7 @@ specConstrProgram dflags us binds
endPass dflags "SpecConstr" Opt_D_dump_spec binds'
dumpIfSet_dyn dflags Opt_D_dump_rules "Top-level specialisations"
(vcat (map dump_specs (concat (map bindersOf binds'))))
(vcat (map pprTidyIdRules (concat (map bindersOf binds'))))
return binds'
where
......@@ -190,8 +189,6 @@ specConstrProgram dflags us binds
go env (bind:binds) = scBind env bind `thenUs` \ (env', _, bind') ->
go env' binds `thenUs` \ binds' ->
returnUs (bind' : binds')
dump_specs var = pprIdRules (tidyIdRules var)
\end{code}
......
......@@ -25,9 +25,8 @@ import VarEnv
import CoreSyn
import CoreUtils ( applyTypeToArgs )
import CoreFVs ( exprFreeVars, exprsFreeVars )
import CoreTidy ( tidyIdRules )
import CoreTidy ( pprTidyIdRules )
import CoreLint ( showPass, endPass )
import PprCore ( pprIdRules )
import Rules ( addIdSpecialisations, lookupRule )
import UniqSupply ( UniqSupply,
......@@ -587,12 +586,10 @@ specProgram dflags us binds
endPass dflags "Specialise" Opt_D_dump_spec binds'
dumpIfSet_dyn dflags Opt_D_dump_rules "Top-level specialisations"
(vcat (map dump_specs (concat (map bindersOf binds'))))
(vcat (map pprTidyIdRules (concat (map bindersOf binds'))))
return binds'
where
dump_specs var = pprIdRules (tidyIdRules var)
-- We need to start with a Subst that knows all the things
-- that are in scope, so that the substitution engine doesn't
-- accidentally re-use a unique that's already in use
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment