on master help sign in
Fix export in Node back end

IO no longer needs to be treated as a special case, because it now gets inlined away.

commit9e34930ef5894933f503931840cfa73d730ced11 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateWed 20 Dec 2017, 10:57 (9 years ago) parent24f580d
1 file changed+1−4
src/IRTS/JavaScript/Codegen.hs+1−4
src/IRTS/JavaScript/Codegen.hs+1−4
@@ -112,15 +112,12 @@ makeExportDecls defs (Export _ _ e) =
112112 ]
113113 uncurryF name argTy Nothing = name
114114
115− addApplyForIO (FIO _) f = T.concat ["function(){ return (",f, ").apply(this,arguments)()}"]
116− addApplyForIO _ f = f
117−
118115 makeExport (ExportData _) =
119116 []
120117 makeExport (ExportFun name (FStr exportname) retTy argTy) =
121118 [T.concat [ T.pack $ exportname
122119 , ": "
123− , addApplyForIO retTy $ uncurryF (jsName name) argTy (getArgList' name defs)
120+ , uncurryF (jsName name) argTy (getArgList' name defs)
124121 ]
125122 ]
126123