git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
No special case for function definitions during codegen
a7335baPhil Freeman
src/Language/PureScript/CodeGen/JS.hs−3
@@ -43,9 +43,6 @@ moduleToJs (Module pname@(ProperName name) decls) env =
43 ]
43 ]
44
44
45declToJs :: ModuleName -> Declaration -> Environment -> Maybe [JS]
45declToJs :: ModuleName -> Declaration -> Environment -> Maybe [JS]
46−declToJs mp (ValueDeclaration ident _ _ (Abs args ret)) e =
47− Just [ JSFunction (Just ident) args (JSBlock [JSReturn (valueToJs mp e ret)]),
48− setProperty (identToJs ident) (JSVar ident) mp ]
49declToJs mp (ValueDeclaration ident _ _ val) e =
46declToJs mp (ValueDeclaration ident _ _ val) e =
50 Just [ JSVariableIntroduction ident (Just (valueToJs mp e val)),
47 Just [ JSVariableIntroduction ident (Just (valueToJs mp e val)),
51 setProperty (identToJs ident) (JSVar ident) mp ]
48 setProperty (identToJs ident) (JSVar ident) mp ]