Skip to content
Snippets Groups Projects
Commit ac3b89dc authored by Michael Hanus's avatar Michael Hanus
Browse files

Type signatures added

parent 1b78b676
Branches notypeclasses
Tags v1.0.0
No related merge requests found
Pipeline #420 failed
......@@ -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" ++
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment