@@ -36,10 +36,10 @@ import Language.PureScript.CodeGen.JS.AST as AST
36declToJs :: Maybe Ident -> ModulePath -> Declaration -> Maybe [JS]
36declToJs :: Maybe Ident -> ModulePath -> Declaration -> Maybe [JS]
37declToJs mod mp (ValueDeclaration ident (Abs args ret)) =
37declToJs mod mp (ValueDeclaration ident (Abs args ret)) =
38 Just $ JSFunction (Just ident) args (JSBlock [JSReturn (valueToJs mp ret)]) :
38 Just $ JSFunction (Just ident) args (JSBlock [JSReturn (valueToJs mp ret)]) :
39− maybe [] (return . setProperty (show ident) (JSVar ident)) mod
39+ maybe [] (return . setProperty (identToJs ident) (JSVar ident)) mod
40declToJs mod mp (ValueDeclaration ident val) =
40declToJs mod mp (ValueDeclaration ident val) =
41 Just $ JSVariableIntroduction ident (Just (valueToJs mp val)) :
41 Just $ JSVariableIntroduction ident (Just (valueToJs mp val)) :
42− maybe [] (return . setProperty (show ident) (JSVar ident)) mod
42+ maybe [] (return . setProperty (identToJs ident) (JSVar ident)) mod
43declToJs mod _ (ExternMemberDeclaration member ident _) =
43declToJs mod _ (ExternMemberDeclaration member ident _) =
44 Just $ JSFunction (Just ident) [Ident "value"] (JSBlock [JSReturn (JSAccessor member (JSVar (Ident "value")))]) :
44 Just $ JSFunction (Just ident) [Ident "value"] (JSBlock [JSReturn (JSAccessor member (JSVar (Ident "value")))]) :
45 maybe [] (return . setProperty (show ident) (JSVar ident)) mod
45 maybe [] (return . setProperty (show ident) (JSVar ident)) mod