+makeVHDLAnnotations libdir filenames stateful = do
+ makeVHDL libdir filenames findTopEntity findInitState findTestInput stateful
+ where
+ findTopEntity = findBind (hasCLasHAnnotation isTopEntity)
+ findInitState = findBind (hasCLasHAnnotation isInitState)
+ findTestInput = findExpr (hasCLasHAnnotation isTestInput)
+
+-- | Turn Haskell to VHDL, using the given finder functions to find the Top
+-- Entity, Initial State and Test Inputs in the Haskell Files.
+makeVHDL ::
+ FilePath -- ^ The GHC Library Dir
+ -> [FilePath] -- ^ The Filenames
+ -> (HscTypes.CoreModule -> Ghc (Maybe CoreBndr)) -- ^ The Top Entity Finder
+ -> (HscTypes.CoreModule -> Ghc (Maybe CoreBndr)) -- ^ The Init State Finder
+ -> (HscTypes.CoreModule -> Ghc (Maybe CoreExpr)) -- ^ The Test Input Finder
+ -> Bool -- ^ Indicates if it is meant to be stateful
+ -> IO ()
+makeVHDL libdir filenames topEntFinder initStateFinder testInputFinder stateful = do