foldConstants *after* inferTypes.

On second thoughts, we can't reasonably fold constants until we know what types
they are.
This commit is contained in:
Adam Sampson 2008-04-06 11:20:34 +00:00
parent 9838cf7b8c
commit ecab9c1881

View File

@ -38,7 +38,7 @@ import Types
occamPasses :: [Pass] occamPasses :: [Pass]
occamPasses = makePassesDep' ((== FrontendOccam) . csFrontend) occamPasses = makePassesDep' ((== FrontendOccam) . csFrontend)
[ ("Fold constants", foldConstants, [ ("Fold constants", foldConstants,
[], [Prop.inferredTypesRecorded],
[Prop.constantsFolded]) [Prop.constantsFolded])
, ("Fix the types of array constructors", fixConstructorTypes, , ("Fix the types of array constructors", fixConstructorTypes,
[Prop.constantsFolded], [Prop.constantsFolded],
@ -47,7 +47,7 @@ occamPasses = makePassesDep' ((== FrontendOccam) . csFrontend)
[Prop.constantsFolded, Prop.arrayConstructorTypesDone], [Prop.constantsFolded, Prop.arrayConstructorTypesDone],
[Prop.constantsChecked]) [Prop.constantsChecked])
, ("Infer types", astAndState inferTypes, , ("Infer types", astAndState inferTypes,
[Prop.constantsFolded], [],
[Prop.inferredTypesRecorded]) [Prop.inferredTypesRecorded])
, ("Check types", checkTypes, , ("Check types", checkTypes,
[Prop.inferredTypesRecorded], [Prop.inferredTypesRecorded],