X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=TranslatorTypes.hs;h=40529ea078d5e46805af27517a070450924c3638;hb=059c20c7b953a21097939a47ecac7f6cad05541a;hp=9a521b840057cbf114611731b17c03a784fb6a11;hpb=5f9b7f3e0c999e765f75b0c48b0f675d99842cea;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/TranslatorTypes.hs b/TranslatorTypes.hs index 9a521b8..40529ea 100644 --- a/TranslatorTypes.hs +++ b/TranslatorTypes.hs @@ -25,7 +25,7 @@ data FuncData = FuncData { flatFunc :: Maybe FlatFunction, funcEntity :: Maybe Entity, funcArch :: Maybe AST.ArchBody -} +} deriving (Show) data VHDLSession = VHDLSession { coreMod :: HscTypes.CoreModule, -- The current module @@ -76,6 +76,10 @@ modFunc :: (FuncData -> FuncData) -> HsFunction -> VHDLState () modFunc f hsfunc = modFuncMap (Map.adjust f hsfunc) +-- | Get the map of functions in the session +getFuncMap :: VHDLState FuncMap +getFuncMap = State.gets funcs + -- | Modify the function map in the session using the given function modFuncMap :: (FuncMap -> FuncMap) -> VHDLState () modFuncMap f = do