Merge git://github.com/darchon/clash into cλash
[matthijs/master-project/cλash.git] / VHDLTypes.hs
index 0a81b7bf75534d314c928ca5e1b3f1f2ca0a89db..ff159fa895a6f4c51318eaaf636c2d390e36e2f6 100644 (file)
@@ -38,8 +38,14 @@ instance Eq OrdType where
 instance Ord OrdType where
   compare (OrdType a) (OrdType b) = Type.tcCmpType a b
 
+data HType = StdType OrdType |
+             ADTType String [HType] |
+             VecType Int HType |
+             BuiltinType String
+  deriving (Eq, Ord)
+
 -- A map of a Core type to the corresponding type name
-type TypeMap = Map.Map OrdType (AST.VHDLId, Either AST.TypeDef AST.SubtypeIn)
+type TypeMap = Map.Map HType (AST.VHDLId, Either AST.TypeDef AST.SubtypeIn)
 
 -- A map of a vector Core element type and function name to the coressponding
 -- VHDLId of the function and the function body.