X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=VHDLTypes.hs;h=ff159fa895a6f4c51318eaaf636c2d390e36e2f6;hb=c8034ff49822eb6e0e0696f288e20e49a1b9af6e;hp=0a81b7bf75534d314c928ca5e1b3f1f2ca0a89db;hpb=afd269e5653952394495a7a14ad1bfc0c0146b39;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/VHDLTypes.hs b/VHDLTypes.hs index 0a81b7b..ff159fa 100644 --- a/VHDLTypes.hs +++ b/VHDLTypes.hs @@ -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.