on master help sign in
Fix export in Node back end
9e34930Edwin Brady
src/IRTS/JavaScript/Codegen.hs+1−4
@@ -112,15 +112,12 @@ makeExportDecls defs (Export _ _ e) =
112 ]
112 ]
113 uncurryF name argTy Nothing = name
113 uncurryF name argTy Nothing = name
114
114
115− addApplyForIO (FIO _) f = T.concat ["function(){ return (",f, ").apply(this,arguments)()}"]
116− addApplyForIO _ f = f
117−
118 makeExport (ExportData _) =
115 makeExport (ExportData _) =
119 []
116 []
120 makeExport (ExportFun name (FStr exportname) retTy argTy) =
117 makeExport (ExportFun name (FStr exportname) retTy argTy) =
121 [T.concat [ T.pack $ exportname
118 [T.concat [ T.pack $ exportname
122 , ": "
119 , ": "
123− , addApplyForIO retTy $ uncurryF (jsName name) argTy (getArgList' name defs)
120+ , uncurryF (jsName name) argTy (getArgList' name defs)
124 ]
121 ]
125 ]
122 ]
126
123