From: Matthijs Kooijman Date: Fri, 30 Jan 2009 08:56:27 +0000 (+0100) Subject: Print the binds we're about to translate. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=c075361c62c6e229700a5cc942ecf5f17514b6c8;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Print the binds we're about to translate. --- diff --git a/Translator.hs b/Translator.hs index ef46be9..a15c9b3 100644 --- a/Translator.hs +++ b/Translator.hs @@ -43,8 +43,9 @@ main = --load LoadAllTargets --core <- GHC.compileToCoreSimplified "Adders.hs" core <- GHC.compileToCoreSimplified "Adders.hs" - liftIO $ printBinds (cm_binds core) + --liftIO $ printBinds (cm_binds core) let binds = Maybe.mapMaybe (findBind (cm_binds core)) ["full_adder", "half_adder"] + liftIO $ printBinds binds -- Turn bind into VHDL let vhdl = State.evalState (mkVHDL binds) (VHDLSession 0 builtin_funcs) liftIO $ putStr $ concat $ map (render . ForSyDe.Backend.Ppr.ppr) vhdl @@ -78,7 +79,7 @@ printBind (Rec binds) = do printBind' (b, expr) = do putStr $ getOccString b - --putStr $ showSDoc $ ppr expr + putStr $ showSDoc $ ppr expr putStr "\n" findBind :: [CoreBind] -> String -> Maybe CoreBind