From: Matthijs Kooijman Date: Fri, 13 Feb 2009 12:43:51 +0000 (+0100) Subject: Put a TypeMark in a VHDLSignalmap. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=a8d7c5bd4b745860f321d4315bff0b9efa3cb05c;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Put a TypeMark in a VHDLSignalmap. --- diff --git a/VHDL.hs b/VHDL.hs index 1927147..df7eaf8 100644 --- a/VHDL.hs +++ b/VHDL.hs @@ -42,9 +42,9 @@ createEntity hsfunc fdata = in fdata { entity = Just entity' } where - mkMap :: Eq id => [(id, SignalInfo)] -> id -> AST.VHDLId + mkMap :: Eq id => [(id, SignalInfo)] -> id -> (AST.VHDLId, AST.TypeMark) mkMap sigmap id = - mkVHDLId nm + (mkVHDLId nm, vhdl_ty ty) where info = Maybe.fromMaybe (error $ "Signal not found in the name map? This should not happen!") @@ -52,6 +52,7 @@ createEntity hsfunc fdata = nm = Maybe.fromMaybe (error $ "Signal not named? This should not happen!") (sigName info) + ty = sigTy info -- | Create the VHDL AST for an entity createEntityAST :: diff --git a/VHDLTypes.hs b/VHDLTypes.hs index 34a2b50..4469647 100644 --- a/VHDLTypes.hs +++ b/VHDLTypes.hs @@ -7,7 +7,7 @@ import qualified ForSyDe.Backend.VHDL.AST as AST import FlattenTypes -type VHDLSignalMap = SignalMap AST.VHDLId +type VHDLSignalMap = SignalMap (AST.VHDLId, AST.TypeMark) -- A description of a VHDL entity. Contains both the entity itself as well as -- info on how to map a haskell value (argument / result) on to the entity's