From ecab9c1881c397f9905eb28cf70a1598892c5e70 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Sun, 6 Apr 2008 11:20:34 +0000 Subject: [PATCH] foldConstants *after* inferTypes. On second thoughts, we can't reasonably fold constants until we know what types they are. --- frontends/OccamPasses.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontends/OccamPasses.hs b/frontends/OccamPasses.hs index 374fa83..173cf58 100644 --- a/frontends/OccamPasses.hs +++ b/frontends/OccamPasses.hs @@ -38,7 +38,7 @@ import Types occamPasses :: [Pass] occamPasses = makePassesDep' ((== FrontendOccam) . csFrontend) [ ("Fold constants", foldConstants, - [], + [Prop.inferredTypesRecorded], [Prop.constantsFolded]) , ("Fix the types of array constructors", fixConstructorTypes, [Prop.constantsFolded], @@ -47,7 +47,7 @@ occamPasses = makePassesDep' ((== FrontendOccam) . csFrontend) [Prop.constantsFolded, Prop.arrayConstructorTypesDone], [Prop.constantsChecked]) , ("Infer types", astAndState inferTypes, - [Prop.constantsFolded], + [], [Prop.inferredTypesRecorded]) , ("Check types", checkTypes, [Prop.inferredTypesRecorded],