X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Translator.hs;h=a15c9b394ce65f75ee7b7be55d8fc4d7b9399c51;hb=c13ec403850827c4679eb6979476a3876f96a397;hp=ef46be9f90f6d2e153e04a3459b654cc57d58070;hpb=1c8b70b006a44dfd4931ab726a0859b79029544d;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git 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