Add predicates for testing representability of types.
[matthijs/master-project/cλash.git] / NormalizeTypes.hs
index 5c7c24a6e1623805f255c2f61e0122e83709e68d..89ed53d41746d871924bf56ba02787d7e475b961 100644 (file)
@@ -20,12 +20,16 @@ import Outputable ( Outputable, showSDoc, ppr )
 -- Local imports
 import CoreShow
 import Pretty
+import VHDLTypes -- For TypeState
 
 data TransformState = TransformState {
     tsUniqSupply_ :: UniqSupply.UniqSupply
   , tsBindings_ :: Map.Map CoreBndr CoreExpr
   , tsNormalized_ :: VarSet.VarSet -- ^ The binders that have been normalized
+  , tsType_ :: TypeState
 }
+-- Create an (almost) empty TransformState, containing just a UniqSupply.
+emptyTransformState uniqSupply = TransformState uniqSupply Map.empty VarSet.emptyVarSet emptyTypeState
 
 $( Data.Accessor.Template.deriveAccessors ''TransformState )