Remove createArchitecture from the VHDLState Monad.
[matthijs/master-project/cλash.git] / TranslatorTypes.hs
index 9a521b840057cbf114611731b17c03a784fb6a11..40529ea078d5e46805af27517a070450924c3638 100644 (file)
@@ -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