X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=clash%2FCLasH%2FTranslator%2FTranslatorTypes.hs;h=c158158fe675a5c01dc701f63d4826cefaacb304;hb=4583b2b6d86da12e795f199f2951b193efed613f;hp=eabb00423c5c0734aab838be9a353db290e32e55;hpb=ef7d876bddac1ebf8ae72dfac9aff33023650f53;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/clash/CLasH/Translator/TranslatorTypes.hs b/clash/CLasH/Translator/TranslatorTypes.hs index eabb004..c158158 100644 --- a/clash/CLasH/Translator/TranslatorTypes.hs +++ b/clash/CLasH/Translator/TranslatorTypes.hs @@ -45,8 +45,14 @@ instance Eq OrdType where instance Ord OrdType where compare (OrdType a) (OrdType b) = Type.tcCmpType a b -data HType = AggrType String [HType] | +data HType = AggrType String (Maybe (String, HType)) [[(String, HType)]] | + -- ^ A type containing multiple fields. Arguments: Type + -- name, an optional EnumType for the constructors (if > 1) + -- and a list containing a list of fields (name, htype) for + -- each constructor. EnumType String [String] | + -- ^ A type containing no fields and multiple constructors. + -- Arguments: Type name, a list of possible values. VecType Int HType | UVecType HType | SizedWType Int |