Commit ac3b89dc authored by Michael Hanus 's avatar Michael Hanus

Type signatures added

parent 1b78b676
Pipeline #420 failed with stages
......@@ -64,9 +64,11 @@ showJSStat i (JSPCall p args) =
showJSStat i (JSReturn e) = blanks i ++ "return " ++ showJSExp e ++";"
showJSStat i (JSVarDecl vi) = blanks i ++ "var x" ++ show vi ++";"
blanks :: Int -> String
blanks n = replicate n ' '
--- Shows a JavaScript function declaration as a string in JavaScript syntax.
showJSFDecl :: JSFDecl -> String
showJSFDecl (JSFDecl f args body) =
"function " ++ f ++ "(" ++
intercalate "," (map showJSExp (map JSIVar args)) ++ ") {\n" ++
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment