X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;ds=sidebyside;f=Compile.hs;fp=Compile.hs;h=eb70d0c8223e9e71ec356cce274f850ad454239b;hb=04f0a9566794cf761b7bcf83190051a400ec3653;hp=2252fc539064b6666fead76092317d1a16f31593;hpb=cfe5796efb06251047f77bf9d2295d7093910292;p=proglang.git diff --git a/Compile.hs b/Compile.hs index 2252fc5..eb70d0c 100644 --- a/Compile.hs +++ b/Compile.hs @@ -7,8 +7,8 @@ cHeader = "#include \nint read(){\nint n;\nscanf(\"%d\",&n);\nreturn n; cFooter = "return 0;}" -compile :: [Stm] -> String -compile s = cHeader++concat (map compileStm s)++cFooter +compile :: [Func] -> [Stm] -> String +compile f s = cHeader++concat (map compileStm s)++cFooter compileExp :: Exp -> String compileExp (EBool True) = "1";