Move the DesignFile creation to VHDL.
[matthijs/master-project/cλash.git] / VHDL.hs
diff --git a/VHDL.hs b/VHDL.hs
index ee61c500a6916f676fd75e1c7566d6d8bb868eab..5d57bb574c98fe55f51e041306e42ccabfcf6950 100644 (file)
--- a/VHDL.hs
+++ b/VHDL.hs
@@ -20,6 +20,16 @@ import FlattenTypes
 import TranslatorTypes
 import Pretty
 
+getDesignFile :: VHDLState AST.DesignFile
+getDesignFile = do
+  -- Extract the library units generated from all the functions in the
+  -- session.
+  funcs <- getFuncs
+  let units = concat $ map getLibraryUnits funcs
+  return $ AST.DesignFile 
+    []
+    units
+  
 -- | Create an entity for a given function
 createEntity ::
   HsFunction        -- | The function signature