X-Git-Url: https://ruin.nu/git/?p=proglang.git;a=blobdiff_plain;f=Compile.hs;h=eb70d0c8223e9e71ec356cce274f850ad454239b;hp=2252fc539064b6666fead76092317d1a16f31593;hb=04f0a9566794cf761b7bcf83190051a400ec3653;hpb=cfe5796efb06251047f77bf9d2295d7093910292 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";