From 733e35d9e17d1fc0bdb642e7b56ebd7ac34d4b67 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 12 Feb 2019 18:39:18 -0400 Subject: - Updated JS machinery. - Moved Scheme machinery around. --- stdlib/source/lux/data/text.lux | 2 + stdlib/source/lux/host/js.lux | 263 +++++++++++++++++ stdlib/source/lux/host/scheme.lux | 317 +++++++++++++++++++++ .../source/lux/platform/compiler/host/scheme.lux | 306 -------------------- stdlib/source/test/lux.lux | 5 +- 5 files changed, 585 insertions(+), 308 deletions(-) create mode 100644 stdlib/source/lux/host/js.lux create mode 100644 stdlib/source/lux/host/scheme.lux delete mode 100644 stdlib/source/lux/platform/compiler/host/scheme.lux diff --git a/stdlib/source/lux/data/text.lux b/stdlib/source/lux/data/text.lux index 4ff4f8fa5..1b414f2f2 100644 --- a/stdlib/source/lux/data/text.lux +++ b/stdlib/source/lux/data/text.lux @@ -28,6 +28,8 @@ (do-template [ ] [(def: #export (from-code ))] + [null 0] + [alarm 7] [back-space 8] [tab 9] [new-line 10] diff --git a/stdlib/source/lux/host/js.lux b/stdlib/source/lux/host/js.lux new file mode 100644 index 000000000..e10c0395f --- /dev/null +++ b/stdlib/source/lux/host/js.lux @@ -0,0 +1,263 @@ +(.module: + [lux (#- Code or and function if cond undefined false true) + [control + [pipe (#+ case>)]] + [data + ["." text + format] + [collection + ["." list ("#/." functor fold)]]] + [macro + ["." template]] + [type + abstract]]) + +(def: argument (text.enclose ["(" ")"])) +(def: element (text.enclose ["[" "]"])) + +(abstract: #export (Code brand) + {} + + Text + + (def: #export code + (-> (Code Any) Text) + (|>> :representation)) + + (do-template [ +] + [(abstract: #export ( brand) {} Any) + (`` (type: #export (|> Any (~~ (template.splice +)))))] + + [Expression Expression' [Code]] + [Location Location' [Expression' Code]] + ) + + (do-template [ +] + [(abstract: #export {} Any) + (`` (type: #export (|> (~~ (template.splice +)))))] + + [Var Var' [Location' Expression' Code]] + [Access Access' [Location' Expression' Code]] + [Computation Computation' [Expression' Code]] + [Statement Statement' [Code]] + ) + + (do-template [ ] + [(def: #export Computation (|> ..argument :abstraction))] + + [null "null"] + [undefined "undefined"] + [false "false"] + [true "true"] + ) + + (def: #export boolean + (-> Bit Computation) + (|>> (case> + #0 ..false + #1 ..true))) + + (def: #export number + (-> Frac Computation) + (|>> %f ..argument :abstraction)) + + (def: sanitize + (-> Text Text) + (`` (|>> (~~ (do-template [ ] + [(text.replace-all )] + + [text.tab "\t"] + [text.vertical-tab "\v"] + [text.null "\0"] + [text.back-space "\b"] + [text.form-feed "\f"] + [text.new-line "\n"] + [text.carriage-return "\r"] + ["'" "\'"] + [text.double-quote (format "\" text.double-quote)] + ["\" "\\"] + )) + ))) + + (def: #export string + (-> Text Computation) + (|>> ..sanitize %t ..argument :abstraction)) + + (def: argument-separator ", ") + (def: field-separator ": ") + (def: statement-suffix ";") + + (def: #export array + (-> (List Expression) Computation) + (|>> (list/map ..code) + (text.join-with ..argument-separator) + ..element + ..argument + :abstraction)) + + (def: #export (at index array-or-object) + (-> Expression Expression Access) + (|> (format (:representation array-or-object) (..element (:representation index))) + ..argument + :abstraction)) + + (def: #export (the field object) + (-> Var Expression Access) + (:abstraction (format (:representation object) "." (:representation field)))) + + (def: #export (do method inputs object) + (-> Var (List Expression) Expression Access) + (|> (format (:representation (..the method object)) + (|> inputs + (list/map ..code) + (text.join-with ..argument-separator) + ..argument)) + ..argument + :abstraction)) + + (def: #export object + (-> (List [Text Computation]) Computation) + (|>> (list/map (.function (_ [key val]) + (format (:representation (..string key)) ..field-separator (:representation val)))) + (text.join-with ..argument-separator) + (text.enclose ["{" "}"]) + ..argument + :abstraction)) + + (def: #export var + (-> Text Var) + (|>> :abstraction)) + + (def: #export (then pre post) + (-> Statement Statement Statement) + (:abstraction (format (:representation pre) " " (:representation post)))) + + (def: block (-> Statement Text) (|>> :representation (text.enclose ["{" "}"]))) + + (def: #export (function name inputs body) + (-> Var (List Var) Statement Computation) + (|> body + ..block + (format "function " (:representation name) + (|> inputs + (list/map ..code) + (text.join-with ..argument-separator) + ..argument) + " ") + ..argument + :abstraction)) + + (def: #export (closure inputs body) + (-> (List Var) Statement Computation) + (|> body + ..block + (format "function" + (|> inputs + (list/map ..code) + (text.join-with ..argument-separator) + ..argument) + " ") + ..argument + :abstraction)) + + (def: #export (apply function inputs) + (-> Expression (List Expression) Computation) + (|> inputs + (list/map ..code) + (text.join-with ..argument-separator) + ..argument + (format (:representation function)) + :abstraction)) + + (do-template [ ] + [(def: #export ( param subject) + (-> Expression Expression Computation) + (|> (format (:representation subject) " " " " (:representation param)) + ..argument + :abstraction))] + + [= "==="] + [< "<"] + [<= "<="] + [> ">"] + [>= ">="] + + [+ "+"] + [- "-"] + [* "*"] + [/ "/"] + [% "%"] + + [or "||"] + [and "&&"] + [bit-or "|"] + [bit-and "&"] + ) + + (def: #export (i32 value) + {#.doc "A 32-bit integer expression."} + (-> Int Computation) + (:abstraction (..argument (format (%i value) "|0")))) + + (def: #export (? test then else) + (-> Expression Expression Expression Computation) + (|> (format (:representation test) + " ? " (:representation then) + " : " (:representation else)) + ..argument + :abstraction)) + + (def: #export type-of + (-> Expression Computation) + (|>> :representation + (format "typeof ") + ..argument + :abstraction)) + + (def: #export use-strict + Statement + (:abstraction (format text.double-quote "use strict" text.double-quote ..statement-suffix))) + + (def: #export (declare name) + (-> Var Statement) + (:abstraction (format "var " (:representation name) ..statement-suffix))) + + (def: #export (define name value) + (-> Var Expression Statement) + (:abstraction (format "var " (:representation name) " = " (:representation value) ..statement-suffix))) + + (def: #export (set name value) + (-> Location Expression Statement) + (:abstraction (format (:representation name) " = " (:representation value) ..statement-suffix))) + + (def: #export (if test then! else!) + (-> Expression Statement Statement Statement) + (:abstraction (format "if(" (:representation test) ") " + (..block then!) + " else " + (..block else!)))) + + (def: #export (while test body) + (-> Expression Statement Statement) + (:abstraction (format "while(" (:representation test) ") " + (..block body)))) + + (def: #export (throw message) + (-> Expression Statement) + (:abstraction (format "throw Error(" (:representation message) ")" ..statement-suffix))) + + (def: #export (return value) + (-> Expression Statement) + (:abstraction (format "return " (:representation value) ..statement-suffix))) + + (def: #export (delete value) + (-> Location Statement) + (:abstraction (format "delete " (:representation value) ..statement-suffix))) + ) + +(def: #export (cond clauses else!) + (-> (List [Expression Statement]) Statement Statement) + (list/fold (.function (_ [test then!] next!) + (..if test then! next!)) + else! + (list.reverse clauses))) diff --git a/stdlib/source/lux/host/scheme.lux b/stdlib/source/lux/host/scheme.lux new file mode 100644 index 000000000..7194935e6 --- /dev/null +++ b/stdlib/source/lux/host/scheme.lux @@ -0,0 +1,317 @@ +(.module: + [lux (#- Code int or and if function cond let) + ["." function] + [control + [pipe (#+ new> cond> case>)]] + [data + [number + ["." frac]] + ["." text + format] + [collection + ["." list ("#/." functor fold)]]] + [macro + ["." template]] + [type + abstract]]) + +(abstract: #export (Code k) + {} + + Text + + (do-template [ +] + [(abstract: #export ( brand) {} Any) + (`` (type: #export (|> Any (~~ (template.splice +)))))] + + [Expression Expression' [Code]] + ) + + (do-template [ +] + [(abstract: #export {} Any) + (`` (type: #export (|> (~~ (template.splice +)))))] + + [Global Global' [Expression' Code]] + [Var Var' [Expression' Code]] + [Computation Computation' [Expression' Code]] + ) + + (type: #export Arguments + {#mandatory (List Var) + #rest (Maybe Var)}) + + (def: #export code (-> (Code Any) Text) (|>> :representation)) + + (def: #export var (-> Text Var) (|>> :abstraction)) + + (def: (arguments [vars rest]) + (-> Arguments (Code Any)) + (case rest + (#.Some rest) + (case vars + #.Nil + rest + + _ + (|> (format " . " (:representation rest)) + (format (|> vars + (list/map ..code) + (text.join-with " "))) + (text.enclose ["(" ")"]) + :abstraction)) + + #.None + (|> vars + (list/map ..code) + (text.join-with " ") + (text.enclose ["(" ")"]) + :abstraction))) + + (def: #export nil + Computation + (:abstraction "'()")) + + (def: #export bool + (-> Bit Computation) + (|>> (case> #0 "#f" + #1 "#t") + :abstraction)) + + (def: #export int + (-> Int Computation) + (|>> %i :abstraction)) + + (def: #export float + (-> Frac Computation) + (|>> (cond> [(f/= frac.positive-infinity)] + [(new> "+inf.0" [])] + + [(f/= frac.negative-infinity)] + [(new> "-inf.0" [])] + + [frac.not-a-number?] + [(new> "+nan.0" [])] + + ## else + [%f]) + :abstraction)) + + (def: #export positive-infinity Computation (..float frac.positive-infinity)) + (def: #export negative-infinity Computation (..float frac.negative-infinity)) + (def: #export not-a-number Computation (..float frac.not-a-number)) + + (def: sanitize + (-> Text Text) + (`` (|>> (~~ (do-template [ ] + [(text.replace-all )] + + [text.alarm "\a"] + [text.back-space "\b"] + [text.tab "\t"] + [text.new-line "\n"] + [text.carriage-return "\r"] + [text.double-quote (format "\" text.double-quote)] + ["\" "\\"] + ["|" "\|"] + )) + ))) + + (def: #export string + (-> Text Computation) + (|>> ..sanitize %t :abstraction)) + + (def: #export symbol + (-> Text Computation) + (|>> (format "'") :abstraction)) + + (def: #export global + (-> Text Global) + (|>> :abstraction)) + + (def: form + (-> (List (Code Any)) Text) + (|>> (list/map ..code) + (text.join-with " ") + (text.enclose ["(" ")"]))) + + (def: #export (apply/* func args) + (-> Expression (List Expression) Computation) + (:abstraction (..form (#.Cons func args)))) + + (do-template [ ] + [(def: #export + (-> (List Expression) Computation) + (apply/* (..global )))] + + [vector/* "vector"] + [list/* "list"] + ) + + (def: #export (apply/0 func) + (-> Expression Computation) + (..apply/* func (list))) + + (do-template [ ] + [(def: #export (apply/0 (..global )))] + + [newline/0 "newline"] + ) + + (do-template [ + + +] + [(`` (def: #export ( function) + (-> Expression (~~ (template.splice +)) Computation) + (.function (_ (~~ (template.splice +))) + (..apply/* function (list (~~ (template.splice +))))))) + + (`` (do-template [ ] + [(def: #export ( (..global )))] + + (~~ (template.splice +))))] + + [apply/1 [_0] [Expression] + [[exact/1 "exact"] + [integer->char/1 "integer->char"] + [number->string/1 "number->string"] + [string/1 "string"] + [length/1 "length"] + [values/1 "values"] + [null?/1 "null?"] + [car/1 "car"] + [cdr/1 "cdr"] + [raise/1 "raise"] + [error-object-message/1 "error-object-message"] + [make-vector/1 "make-vector"] + [vector-length/1 "vector-length"] + [not/1 "not"] + [string-length/1 "string-length"] + [string-hash/1 "string-hash"] + [reverse/1 "reverse"] + [display/1 "display"] + [exit/1 "exit"]]] + + [apply/2 [_0 _1] [Expression Expression] + [[append/2 "append"] + [cons/2 "cons"] + [make-vector/2 "make-vector"] + [vector-ref/2 "vector-ref"] + [list-tail/2 "list-tail"] + [map/2 "map"] + [string-ref/2 "string-ref"] + [string-append/2 "string-append"]]] + + [apply/3 [_0 _1 _2] [Expression Expression Expression] + [[substring/3 "substring"] + [vector-set!/3 "vector-set!"]]] + + [apply/5 [_0 _1 _2 _3 _4] [Expression Expression Expression Expression Expression] + [[vector-copy!/5 "vector-copy!"]]] + ) + + (do-template [ ] + [(def: #export ( param subject) + (-> Expression Expression Computation) + (..apply/2 (..global ) subject param))] + + [=/2 "="] + [eq?/2 "eq?"] + [eqv?/2 "eqv?"] + [/2 ">"] + [>=/2 ">="] + [string=?/2 "string=?"] + [string ] + [(def: #export + (-> (List Expression) Computation) + (|>> (list& (..global )) ..form :abstraction))] + + [or "or"] + [and "and"] + ) + + (do-template [
]
+    [(def: #export ( bindings body)
+       (-> (List [ Expression]) Expression Computation)
+       (:abstraction
+        (..form (list (..global )
+                      (|> bindings
+                          (list/map (.function (_ [binding/name binding/value])
+                                      (:abstraction
+                                       (..form (list (
 binding/name)
+                                                     binding/value)))))
+                          ..form
+                          :abstraction)
+                      body))))]
+
+    [let           "let"           Var       function.identity]
+    [let*          "let*"          Var       function.identity]
+    [letrec        "letrec"        Var       function.identity]
+    [let-values    "let-values"    Arguments ..arguments]
+    [let*-values   "let*-values"   Arguments ..arguments]
+    [letrec-values "letrec-values" Arguments ..arguments]
+    )
+
+  (def: #export (if test then else)
+    (-> Expression Expression Expression Computation)
+    (:abstraction
+     (..form (list (..global "if") test then else))))
+
+  (def: #export (when test then)
+    (-> Expression Expression Computation)
+    (:abstraction
+     (..form (list (..global "when") test then))))
+
+  (def: #export (cond clauses else)
+    (-> (List [Expression Expression]) Expression Computation)
+    (|> (list/fold (.function (_ [test then] next)
+                     (if test then next))
+                   else
+                   (list.reverse clauses))
+        :representation
+        :abstraction))
+
+  (def: #export (lambda arguments body)
+    (-> Arguments Expression Computation)
+    (:abstraction
+     (..form (list (..global "lambda")
+                   (..arguments arguments)
+                   body))))
+
+  (def: #export (define name arguments body)
+    (-> Var Arguments Expression Computation)
+    (:abstraction
+     (..form (list (..global "define")
+                   (|> arguments
+                       (update@ #mandatory (|>> (#.Cons name)))
+                       ..arguments)
+                   body))))
+
+  (def: #export begin
+    (-> (List Expression) Computation)
+    (|>> (#.Cons (..global "begin")) ..form :abstraction))
+
+  (def: #export (set! name value)
+    (-> Var Expression Computation)
+    (:abstraction
+     (..form (list (..global "set!") name value))))
+
+  (def: #export (with-exception-handler handler body)
+    (-> Expression Expression Computation)
+    (:abstraction
+     (..form (list (..global "with-exception-handler") handler body))))
+  )
diff --git a/stdlib/source/lux/platform/compiler/host/scheme.lux b/stdlib/source/lux/platform/compiler/host/scheme.lux
deleted file mode 100644
index df5a091f3..000000000
--- a/stdlib/source/lux/platform/compiler/host/scheme.lux
+++ /dev/null
@@ -1,306 +0,0 @@
-(.module:
-  [lux (#- Code' Code int or and if function cond when let)
-   [control
-    pipe]
-   [data
-    ["." number]
-    ["." text
-     format]
-    [collection
-     ["." list ("#/." functor fold)]]]
-   [type
-    abstract]])
-
-(abstract: Global' {} Any)
-(abstract: Var' {} Any)
-(abstract: Computation' {} Any)
-(abstract: (Expression' k) {} Any)
-
-(abstract: (Code' k)
-  {}
-  
-  Text
-
-  (type: #export Code (Ex [k] (Code' k)))
-  (type: #export Expression (Code' (Ex [k] (Expression' k))))
-  (type: #export Global (Code' (Expression' Global')))
-  (type: #export Computation (Code' (Expression' Computation')))
-  (type: #export Var (Code' (Expression' Var')))
-
-  (type: #export Arguments
-    {#mandatory (List Var)
-     #rest (Maybe Var)})
-
-  (def: #export code (-> Code Text) (|>> :representation))
-
-  (def: #export var (-> Text Var) (|>> :abstraction))
-
-  (def: (arguments [vars rest])
-    (-> Arguments Code)
-    (case rest
-      (#.Some rest)
-      (case vars
-        #.Nil
-        rest
-
-        _
-        (|> (format " . " (:representation rest))
-            (format (|> vars
-                        (list/map ..code)
-                        (text.join-with " ")))
-            (text.enclose ["(" ")"])
-            :abstraction))
-      
-      #.None
-      (|> vars
-          (list/map ..code)
-          (text.join-with " ")
-          (text.enclose ["(" ")"])
-          :abstraction)))
-
-  (def: #export nil
-    Computation
-    (:abstraction "'()"))
-
-  (def: #export bool
-    (-> Bit Computation)
-    (|>> (case> #0 "#f"
-                #1 "#t")
-         :abstraction))
-
-  (def: #export int
-    (-> Int Computation)
-    (|>> %i :abstraction))
-
-  (def: #export float
-    (-> Frac Computation)
-    (|>> (cond> [(f/= number.positive-infinity)]
-                [(new> "+inf.0")]
-                
-                [(f/= number.negative-infinity)]
-                [(new> "-inf.0")]
-                
-                [number.not-a-number?]
-                [(new> "+nan.0")]
-                
-                ## else
-                [%f])
-         :abstraction))
-
-  (def: #export positive-infinity Computation (..float number.positive-infinity))
-  (def: #export negative-infinity Computation (..float number.negative-infinity))
-  (def: #export not-a-number Computation (..float number.not-a-number))
-
-  (def: #export string
-    (-> Text Computation)
-    (|>> %t :abstraction))
-
-  (def: #export symbol
-    (-> Text Computation)
-    (|>> (format "'") :abstraction))
-
-  (def: #export global
-    (-> Text Global)
-    (|>> :abstraction))
-
-  (def: form
-    (-> (List Code) Text)
-    (|>> (list/map ..code)
-         (text.join-with " ")
-         (text.enclose ["(" ")"])))
-  
-  (def: #export (apply/* func args)
-    (-> Expression (List Expression) Computation)
-    (:abstraction (..form (#.Cons func args))))
-  
-  (do-template [ ]
-    [(def: #export 
-       (-> (List Expression) Computation)
-       (apply/* (..global )))]
-
-    [vector/* "vector"]
-    [list/*   "list"]
-    )
-
-  (def: #export (apply/0 func)
-    (-> Expression Computation)
-    (..apply/* func (list)))
-
-  (do-template [ ]
-    [(def: #export  (apply/0 (..global )))]
-
-    [newline/0 "newline"]
-    )
-
-  (def: #export (apply/1 func)
-    (-> Expression (-> Expression Computation))
-    (|>> (list) (..apply/* func)))
-
-  (do-template [ ]
-    [(def: #export  (apply/1 (..global )))]
-
-    [exact/1 "exact"]
-    [integer->char/1 "integer->char"]
-    [number->string/1 "number->string"]
-    [string/1 "string"]
-    [length/1 "length"]
-    [values/1 "values"]
-    [null?/1 "null?"]
-    [car/1 "car"]
-    [cdr/1 "cdr"]
-    [raise/1 "raise"]
-    [error-object-message/1 "error-object-message"]
-    [make-vector/1 "make-vector"]
-    [vector-length/1 "vector-length"]
-    [not/1 "not"]
-    [string-length/1 "string-length"]
-    [string-hash/1 "string-hash"]
-    [reverse/1 "reverse"]
-    [display/1 "display"]
-    [exit/1 "exit"]
-    )
-  
-  (def: #export (apply/2 func)
-    (-> Expression (-> Expression Expression Computation))
-    (.function (_ _0 _1)
-      (..apply/* func (list _0 _1))))
-
-  (do-template [ ]
-    [(def: #export  (apply/2 (..global )))]
-
-    [append/2 "append"]
-    [cons/2 "cons"]
-    [make-vector/2 "make-vector"]
-    [vector-ref/2 "vector-ref"]
-    [list-tail/2 "list-tail"]
-    [map/2 "map"]
-    [string-ref/2 "string-ref"]
-    [string-append/2 "string-append"]
-    )
-
-  (do-template [ ]
-    [(def: #export ( param subject)
-       (-> Expression Expression Computation)
-       (..apply/2 (..global ) subject param))]
-
-    [=/2   "="]
-    [eq?/2 "eq?"]
-    [eqv?/2 "eqv?"]
-    [/2   ">"]
-    [>=/2  ">="]
-    [string=?/2 "string=?"]
-    [string Expression (-> Expression Expression Expression Computation))
-    (.function (_ _0 _1 _2)
-      (..apply/* func (list _0 _1 _2))))
-
-  (do-template [ ]
-    [(def: #export  (apply/3 (..global )))]
-
-    [substring/3 "substring"]
-    [vector-set!/3 "vector-set!"]
-    )
-
-  (def: #export (vector-copy!/5 _0 _1 _2 _3 _4)
-    (-> Expression Expression Expression Expression Expression
-        Computation)
-    (..apply/* (..global "vector-copy!")
-               (list _0 _1 _2 _3 _4)))
-  
-  (do-template [ ]
-    [(def: #export 
-       (-> (List Expression) Computation)
-       (|>> (list& (..global )) ..form :abstraction))]
-
-    [or "or"]
-    [and "and"]
-    )
-
-  (do-template [   
]
-    [(def: #export ( bindings body)
-       (-> (List [ Expression]) Expression Computation)
-       (:abstraction
-        (..form (list (..global )
-                      (|> bindings
-                          (list/map (.function (_ [binding/name binding/value])
-                                      (:abstraction
-                                       (..form (list (
 binding/name)
-                                                     binding/value)))))
-                          ..form
-                          :abstraction)
-                      body))))]
-
-    [let           "let"           Var       .id]
-    [let*          "let*"          Var       .id]
-    [letrec        "letrec"        Var       .id]
-    [let-values    "let-values"    Arguments ..arguments]
-    [let*-values   "let*-values"   Arguments ..arguments]
-    [letrec-values "letrec-values" Arguments ..arguments]
-    )
-
-  (def: #export (if test then else)
-    (-> Expression Expression Expression Computation)
-    (:abstraction
-     (..form (list (..global "if") test then else))))
-
-  (def: #export (when test then)
-    (-> Expression Expression Computation)
-    (:abstraction
-     (..form (list (..global "when") test then))))
-
-  (def: #export (cond clauses else)
-    (-> (List [Expression Expression]) Expression Computation)
-    (|> (list/fold (.function (_ [test then] next)
-                     (if test then next))
-                   else
-                   (list.reverse clauses))
-        :representation
-        :abstraction))
-
-  (def: #export (lambda arguments body)
-    (-> Arguments Expression Computation)
-    (:abstraction
-     (..form (list (..global "lambda")
-                   (..arguments arguments)
-                   body))))
-
-  (def: #export (define name arguments body)
-    (-> Var Arguments Expression Computation)
-    (:abstraction
-     (..form (list (..global "define")
-                   (|> arguments
-                       (update@ #mandatory (|>> (#.Cons name)))
-                       ..arguments)
-                   body))))
-
-  (def: #export begin
-    (-> (List Expression) Computation)
-    (|>> (#.Cons (..global "begin")) ..form :abstraction))
-
-  (def: #export (set! name value)
-    (-> Var Expression Computation)
-    (:abstraction
-     (..form (list (..global "set!") name value))))
-
-  (def: #export (with-exception-handler handler body)
-    (-> Expression Expression Computation)
-    (:abstraction
-     (..form (list (..global "with-exception-handler") handler body))))
-  )
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index e498c1445..d754862a8 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -23,6 +23,9 @@
     [format
      [css (#+)]
      [markdown (#+)]]]
+   [host
+    [js (#+)]
+    [scheme (#+)]]
    ## [control
    ##  ["._" contract]
    ##  ["._" concatenative]
@@ -96,8 +99,6 @@
     ["/." jvm]]
    ["/." control]]
   ## [control
-  ##  ## [parser (#+)]
-  ##  ## [thread (#+)]
   ##  ## [region (#+)]
   ##  ## [security
   ##  ##  [privacy (#+)]
-- 
cgit v1.2.3