Skip to content

Commit 2d941a9

Browse files
committed
Remove generation of dead code 'this.loadLibs' preamble of JS output
1 parent 5fad9f0 commit 2d941a9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/src/Stack2JS.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ instance Aeson.ToJSON LibAccess
6666
jsLoadLibs = vcat $ map text [
6767
"this.libSet = new Set ()",
6868
"this.libs = []",
69-
"this.addLib = function (lib, decl) { if (!this.libSet.has (lib +'.'+decl)) { this.libSet.add (lib +'.'+decl); this.libs.push ({lib:lib, decl:decl})} }",
70-
"this.loadlibs = function (cb) { rt.linkLibs (this.libs, this, cb) }" ]
69+
"this.addLib = function (lib, decl) { if (!this.libSet.has (lib +'.'+decl)) { this.libSet.add (lib +'.'+decl); this.libs.push ({lib:lib, decl:decl})} }" ]
7170

7271
addLibs xs = vcat $ nub (map addOneLib xs)
7372
where addOneLib (LibAccess (Basics.LibName libname) varname) =

0 commit comments

Comments
 (0)