From f39903a05a540e2438805792ac39a89dac1c8e99 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 19 Feb 2009 11:35:13 +0100 Subject: [PATCH] Further reduce main and add a makeVHDL function. --- Translator.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Translator.hs b/Translator.hs index 9838060..ddd09fc 100644 --- a/Translator.hs +++ b/Translator.hs @@ -42,10 +42,14 @@ import VHDLTypes import qualified VHDL main = do + makeVHDL "Alu.hs" "salu" + +makeVHDL :: String -> String -> IO () +makeVHDL filename name = do -- Load the module - core <- loadModule "Alu.hs" + core <- loadModule filename -- Translate to VHDL - vhdl <- moduleToVHDL core ["salu"] + vhdl <- moduleToVHDL core [name] -- Write VHDL to file writeVHDL vhdl "../vhdl/vhdl/output.vhdl" -- 2.30.2