From c77b7153a516c7dab7824520dd391189270a570b Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 18 Feb 2009 16:06:20 +0100 Subject: [PATCH] Add a listBind function to show the Core for a bind. This function is meant to be used from the ghci console. --- Translator.hs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Translator.hs b/Translator.hs index 3cf456e..53befc2 100644 --- a/Translator.hs +++ b/Translator.hs @@ -49,6 +49,15 @@ main = do -- Write VHDL to file writeVHDL vhdl "../vhdl/vhdl/output.vhdl" +-- | Show the core structure of the given binds in the given file. +listBind :: String -> String -> IO () +listBind filename name = do + core <- loadModule filename + let binds = findBinds core [name] + putStr "\n" + putStr $ prettyShow binds + putStr "\n\n" + -- | Translate the binds with the given names from the given core module to -- VHDL moduleToVHDL :: HscTypes.CoreModule -> [String] -> IO AST.DesignFile -- 2.30.2