diff options
Diffstat (limited to 'source/lux.lux')
-rw-r--r-- | source/lux.lux | 427 |
1 files changed, 213 insertions, 214 deletions
diff --git a/source/lux.lux b/source/lux.lux index c5a532a2a..36e678886 100644 --- a/source/lux.lux +++ b/source/lux.lux @@ -245,12 +245,12 @@ (lambda' _ data (#Meta [["" -1 -1] data])))) -## (def (return' x) +## (def (return x) ## (All [a] ## (-> a CompilerState ## (Either Text (, CompilerState a)))) ## ...) -(def' return' +(def' return (:' (#AllT [#None "" "a" (#LambdaT [(#BoundT "a") (#LambdaT [CompilerState @@ -262,12 +262,12 @@ (lambda' _ state (#Right [state val]))))) -## (def (fail' msg) +## (def (fail msg) ## (All [a] ## (-> Text CompilerState ## (Either Text (, CompilerState a)))) ## ...) -(def' fail' +(def' fail (:' (#AllT [#None "" "a" (#LambdaT [Text (#LambdaT [CompilerState @@ -284,7 +284,7 @@ ## (lambda' _ tokens ## (case' tokens ## (#Cons [lhs (#Cons [rhs (#Cons [body #Nil])])]) -## (return' (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "case'"])) +## (return (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "case'"])) ## (#Cons [rhs (#Cons [lhs (#Cons [body #Nil])])])]))) ## #Nil])) @@ -295,52 +295,52 @@ (lambda' _ tokens (case' tokens (#Cons [lhs (#Cons [rhs (#Cons [body #Nil])])]) - (return' (:' SyntaxList - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "case'"])) - (#Cons [rhs (#Cons [lhs (#Cons [body #Nil])])])]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "case'"])) + (#Cons [rhs (#Cons [lhs (#Cons [body #Nil])])])]))) + #Nil]))) _ - (fail' "Wrong syntax for let'"))))) + (fail "Wrong syntax for let'"))))) (def' lambda (:' Macro (lambda' _ tokens (case' tokens (#Cons [(#Meta [_ (#Tuple (#Cons [arg args']))]) (#Cons [body #Nil])]) - (return' (:' SyntaxList - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "lambda'"])) - (#Cons [(_meta (#Symbol ["" ""])) - (#Cons [arg - (#Cons [(case' args' - #Nil - body - - _ - (_meta (#Form (#Cons [(_meta (#Symbol ["lux" "lambda"])) - (#Cons [(_meta (#Tuple args')) - (#Cons [body #Nil])])])))) - #Nil])])])]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "lambda'"])) + (#Cons [(_meta (#Symbol ["" ""])) + (#Cons [arg + (#Cons [(case' args' + #Nil + body + + _ + (_meta (#Form (#Cons [(_meta (#Symbol ["lux" "lambda"])) + (#Cons [(_meta (#Tuple args')) + (#Cons [body #Nil])])])))) + #Nil])])])]))) + #Nil]))) (#Cons [(#Meta [_ (#Symbol self)]) (#Cons [(#Meta [_ (#Tuple (#Cons [arg args']))]) (#Cons [body #Nil])])]) - (return' (:' SyntaxList - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "lambda'"])) - (#Cons [(_meta (#Symbol self)) - (#Cons [arg - (#Cons [(case' args' - #Nil - body - - _ - (_meta (#Form (#Cons [(_meta (#Symbol ["lux" "lambda"])) - (#Cons [(_meta (#Tuple args')) - (#Cons [body #Nil])])])))) - #Nil])])])]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "lambda'"])) + (#Cons [(_meta (#Symbol self)) + (#Cons [arg + (#Cons [(case' args' + #Nil + body + + _ + (_meta (#Form (#Cons [(_meta (#Symbol ["lux" "lambda"])) + (#Cons [(_meta (#Tuple args')) + (#Cons [body #Nil])])])))) + #Nil])])])]))) + #Nil]))) _ - (fail' "Wrong syntax for lambda"))))) + (fail "Wrong syntax for lambda"))))) (export' lambda) (def' def @@ -348,50 +348,50 @@ (lambda [tokens] (case' tokens (#Cons [(#Meta [_ (#Symbol name)]) (#Cons [body #Nil])]) - (return' (:' SyntaxList - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "def'"])) tokens]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "def'"])) tokens]))) + #Nil]))) (#Cons [(#Meta [_ (#Form (#Cons [(#Meta [_ (#Symbol name)]) args]))]) (#Cons [body #Nil])]) - (return' (:' SyntaxList - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "def'"])) - (#Cons [(_meta (#Symbol name)) - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["lux" "lambda"])) - (#Cons [(_meta (#Symbol name)) - (#Cons [(_meta (#Tuple args)) - (#Cons [body #Nil])])])]))) - #Nil])])]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "def'"])) + (#Cons [(_meta (#Symbol name)) + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["lux" "lambda"])) + (#Cons [(_meta (#Symbol name)) + (#Cons [(_meta (#Tuple args)) + (#Cons [body #Nil])])])]))) + #Nil])])]))) + #Nil]))) (#Cons [(#Meta [_ (#Symbol name)]) (#Cons [type (#Cons [body #Nil])])]) - (return' (:' SyntaxList - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "def'"])) - (#Cons [(_meta (#Symbol name)) - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" ":'"])) - (#Cons [type - (#Cons [body - #Nil])])]))) - #Nil])])]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "def'"])) + (#Cons [(_meta (#Symbol name)) + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" ":'"])) + (#Cons [type + (#Cons [body + #Nil])])]))) + #Nil])])]))) + #Nil]))) (#Cons [(#Meta [_ (#Form (#Cons [(#Meta [_ (#Symbol name)]) args]))]) (#Cons [type (#Cons [body #Nil])])]) - (return' (:' SyntaxList - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "def'"])) - (#Cons [(_meta (#Symbol name)) - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" ":'"])) - (#Cons [type - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["lux" "lambda"])) - (#Cons [(_meta (#Symbol name)) - (#Cons [(_meta (#Tuple args)) - (#Cons [body #Nil])])])]))) - #Nil])])]))) - #Nil])])]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" "def'"])) + (#Cons [(_meta (#Symbol name)) + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["" ":'"])) + (#Cons [type + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["lux" "lambda"])) + (#Cons [(_meta (#Symbol name)) + (#Cons [(_meta (#Tuple args)) + (#Cons [body #Nil])])])]))) + #Nil])])]))) + #Nil])])]))) + #Nil]))) _ - (fail' "Wrong syntax for def") + (fail "Wrong syntax for def") )))) (export' def) @@ -400,107 +400,99 @@ (case' tokens (#Cons [(#Meta [_ (#Form (#Cons [(#Meta [_ (#Symbol fn-name)]) args]))]) (#Cons [body #Nil])]) - (return' (:' SyntaxList - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["lux" "def"])) - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol fn-name)) args]))) - (#Cons [(_meta (#Symbol ["lux" "Macro"])) - (#Cons [body - #Nil])]) - ])]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["lux" "def"])) + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol fn-name)) args]))) + (#Cons [(_meta (#Symbol ["lux" "Macro"])) + (#Cons [body + #Nil])]) + ])]))) + #Nil]))) _ - (fail' "Wrong syntax for defmacro"))) + (fail "Wrong syntax for defmacro"))) (defmacro (comment tokens) - (return' (:' SyntaxList #Nil))) + (return (:' SyntaxList #Nil))) (export' comment) (defmacro (->' tokens) (case' tokens (#Cons [input (#Cons [output #Nil])]) - (return' (:' SyntaxList - (#Cons [(_meta (#Form (#Cons [(_meta (#Tag ["lux" "LambdaT"])) - (#Cons [(_meta (#Tuple (#Cons [input (#Cons [output #Nil])]))) - #Nil])]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Tag ["lux" "LambdaT"])) + (#Cons [(_meta (#Tuple (#Cons [input (#Cons [output #Nil])]))) + #Nil])]))) + #Nil]))) (#Cons [input (#Cons [output others])]) - (return' (:' SyntaxList(#Cons [(_meta (#Form (#Cons [(_meta (#Tag ["lux" "LambdaT"])) - (#Cons [(_meta (#Tuple (#Cons [input - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["lux" "->'"])) - (#Cons [output others])]))) - #Nil])]))) - #Nil])]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Tag ["lux" "LambdaT"])) + (#Cons [(_meta (#Tuple (#Cons [input + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["lux" "->'"])) + (#Cons [output others])]))) + #Nil])]))) + #Nil])]))) + #Nil]))) _ - (fail' "Wrong syntax for ->'"))) - -(def (int:+ x y) - (->' Int Int Int) - (jvm-ladd x y)) + (fail "Wrong syntax for ->'"))) (defmacro (All' tokens) (case' tokens (#Cons [(#Meta [_ (#Tuple #Nil)]) (#Cons [body #Nil])]) - (return' (:' SyntaxList - (#Cons [body - #Nil]))) + (return (:' SyntaxList + (#Cons [body + #Nil]))) (#Cons [(#Meta [_ (#Tuple (#Cons [(#Meta [_ (#Symbol ["" arg-name])]) other-args]))]) (#Cons [body #Nil])]) - (return' (:' SyntaxList - (#Cons [(_meta (#Form (#Cons [(_meta (#Tag ["lux" "AllT"])) - (#Cons [(_meta (#Tuple (#Cons [(_meta (#Tag ["lux" "None"])) - (#Cons [(_meta (#Text "")) - (#Cons [(_meta (#Text arg-name)) - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["lux" "All'"])) - (#Cons [(_meta (#Tuple other-args)) - (#Cons [body - #Nil])])]))) - #Nil])])])]))) - #Nil])]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Tag ["lux" "AllT"])) + (#Cons [(_meta (#Tuple (#Cons [(_meta (#Tag ["lux" "None"])) + (#Cons [(_meta (#Text "")) + (#Cons [(_meta (#Text arg-name)) + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["lux" "All'"])) + (#Cons [(_meta (#Tuple other-args)) + (#Cons [body + #Nil])])]))) + #Nil])])])]))) + #Nil])]))) + #Nil]))) _ - (fail' "Wrong syntax for All'"))) + (fail "Wrong syntax for All'"))) (defmacro (B' tokens) (case' tokens (#Cons [(#Meta [_ (#Symbol ["" bound-name])]) #Nil]) - (return' (:' SyntaxList - (#Cons [(_meta (#Form (#Cons [(_meta (#Tag ["lux" "BoundT"])) - (#Cons [(_meta (#Text bound-name)) - #Nil])]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Tag ["lux" "BoundT"])) + (#Cons [(_meta (#Text bound-name)) + #Nil])]))) + #Nil]))) _ - (fail' "Wrong syntax for B'"))) + (fail "Wrong syntax for B'"))) (defmacro ($' tokens) (case' tokens (#Cons [x #Nil]) - (return' tokens) + (return tokens) (#Cons [x (#Cons [y xs])]) - (return' (:' SyntaxList - (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["lux" "$'"])) - (#Cons [(_meta (#Form (#Cons [(_meta (#Tag ["lux" "AppT"])) - (#Cons [(_meta (#Tuple (#Cons [x (#Cons [y #Nil])]))) - #Nil])]))) - xs])]))) - #Nil]))) + (return (:' SyntaxList + (#Cons [(_meta (#Form (#Cons [(_meta (#Symbol ["lux" "$'"])) + (#Cons [(_meta (#Form (#Cons [(_meta (#Tag ["lux" "AppT"])) + (#Cons [(_meta (#Tuple (#Cons [x (#Cons [y #Nil])]))) + #Nil])]))) + xs])]))) + #Nil]))) _ - (fail' "Wrong syntax for $'"))) - -(def (id x) - (All' [a] (->' (B' a) (B' a))) - x) -(export' id) + (fail "Wrong syntax for $'"))) (def (fold f init xs) (All' [a b] @@ -515,7 +507,7 @@ (#Cons [x xs']) (fold f (f init x) xs'))) -(def (reverse' list) +(def (reverse list) (All' [a] (->' ($' List (B' a)) ($' List (B' a)))) (fold (:' (All' [a] @@ -526,38 +518,38 @@ list)) (defmacro (list xs) - (return' (:' SyntaxList - (#Cons [(fold (:' (->' Syntax Syntax Syntax) - (lambda [tail head] - (_meta (#Form (#Cons [(_meta (#Tag ["lux" "Cons"])) - (#Cons [(_meta (#Tuple (#Cons [head (#Cons [tail #Nil])]))) - #Nil])]))))) - (_meta (#Tag ["lux" "Nil"])) - (reverse' xs)) - #Nil])))) + (return (:' SyntaxList + (#Cons [(fold (:' (->' Syntax Syntax Syntax) + (lambda [tail head] + (_meta (#Form (#Cons [(_meta (#Tag ["lux" "Cons"])) + (#Cons [(_meta (#Tuple (#Cons [head (#Cons [tail #Nil])]))) + #Nil])]))))) + (_meta (#Tag ["lux" "Nil"])) + (reverse xs)) + #Nil])))) (export' list) (defmacro (list& xs) - (case' (reverse' xs) + (case' (reverse xs) (#Cons [last init]) - (return' (:' SyntaxList - (list (fold (:' (->' Syntax Syntax Syntax) - (lambda [tail head] - (_meta (#Form (list (_meta (#Tag ["lux" "Cons"])) - (_meta (#Tuple (list head tail)))))))) - last - init)))) + (return (:' SyntaxList + (list (fold (:' (->' Syntax Syntax Syntax) + (lambda [tail head] + (_meta (#Form (list (_meta (#Tag ["lux" "Cons"])) + (_meta (#Tuple (list head tail)))))))) + last + init)))) _ - (fail' "Wrong syntax for list&"))) + (fail "Wrong syntax for list&"))) (export' list&) -(def (as-pairs' xs) +(def (as-pairs xs) (All' [a] (->' ($' List (B' a)) ($' List (#TupleT (list (B' a) (B' a)))))) (case' xs (#Cons [x (#Cons [y xs'])]) - (list& [x y] (as-pairs' xs')) + (list& [x y] (as-pairs xs')) _ #Nil)) @@ -565,23 +557,23 @@ (defmacro (let tokens) (case' tokens (#Cons [(#Meta [_ (#Tuple bindings)]) (#Cons [body #Nil])]) - (return' (:' SyntaxList - (list (fold (:' (->' Syntax (#TupleT (list Syntax Syntax)) - Syntax) - (lambda [body binding] - (case' binding - [label value] - (_meta (#Form (list (_meta (#Symbol ["lux" "let'"])) label value body)))))) - body - (fold (:' (->' ($' List (#TupleT (list Syntax Syntax))) (#TupleT (list Syntax Syntax)) - ($' List (#TupleT (list Syntax Syntax)))) - (lambda [tail head] - (#Cons [head tail]))) - #Nil - (as-pairs' bindings)))))) + (return (:' SyntaxList + (list (fold (:' (->' Syntax (#TupleT (list Syntax Syntax)) + Syntax) + (lambda [body binding] + (case' binding + [label value] + (_meta (#Form (list (_meta (#Symbol ["lux" "let'"])) label value body)))))) + body + (fold (:' (->' ($' List (#TupleT (list Syntax Syntax))) (#TupleT (list Syntax Syntax)) + ($' List (#TupleT (list Syntax Syntax)))) + (lambda [tail head] + (#Cons [head tail]))) + #Nil + (as-pairs bindings)))))) _ - (fail' "Wrong syntax for let"))) + (fail "Wrong syntax for let"))) (export' let) (def (map f xs) @@ -654,54 +646,57 @@ (defmacro (` tokens) (case' tokens (#Cons [template #Nil]) - (return' (:' SyntaxList - (list (untemplate template)))) + (return (:' SyntaxList + (list (untemplate template)))) _ - (fail' "Wrong syntax for `"))) + (fail "Wrong syntax for `"))) (export' `) (defmacro (if tokens) (case' tokens (#Cons [test (#Cons [then (#Cons [else #Nil])])]) - (return' (:' SyntaxList - (list (` (case' (~ test) - true (~ then) - false (~ else)))))) + (return (:' SyntaxList + (list (` (case' (~ test) + true (~ then) + false (~ else)))))) _ - (fail' "Wrong syntax for if"))) + (fail "Wrong syntax for if"))) (export' if) -## (defmacro (, tokens) -## (let [elems (fold (:' (->' Syntax Syntax Syntax) -## (lambda [tail head] -## (` (#Cons [(~ head) (~ tail)])))) -## (` #Nil) -## (reverse' tokens))] -## (return' (list (` (#TupleT (~ elems))))))) -## (export' ,) +## (def (id x) +## (All [a] (-> a a)) +## x) +## (export' id) ## (defmacro (^ tokens) ## (case' tokens ## (#Cons [(#Meta [_ (#Symbol ["" class-name])]) #Nil]) -## (return' (list (` (#DataT (~ (_meta (#Text class-name))))))) +## (return (:' SyntaxList +## (list (` (#DataT (~ (_meta (#Text class-name)))))))) ## _ -## (fail' "Wrong syntax for ^"))) +## (fail "Wrong syntax for ^"))) ## (export' ^) -## (defmacro (-> tokens) -## (case' (reverse' tokens) -## (#Cons [f-return f-args]) -## (fold (:' (->' Syntax Syntax Syntax) -## (lambda [f-return f-arg] -## (` (#LambdaT [(~ f-arg) (~ f-return)])))) -## f-return -## f-args) +## (defmacro (, tokens) +## (return (:' SyntaxList +## (list (` (#TupleT (list (~@ tokens)))))))) +## (export' ,) +## (defmacro (-> tokens) +## (case' (reverse tokens) +## (#Cons [output inputs]) +## (return (:' SyntaxList +## (list (fold (:' (->' Syntax Syntax Syntax) +## (lambda [o i] +## (` (#;LambdaT [(~ i) (~ o)])))) +## output +## inputs)))) + ## _ -## (fail' "Wrong syntax for ^"))) +## (fail "Wrong syntax for ->"))) ## (export' ->) ## (defmacro (| members) @@ -714,7 +709,7 @@ ## (#Meta [_ (#Form (#Cons [(#Meta [_ (#Tag [module name])]) (#Cons [value #Nil])]))]) ## (` [(~ ($ text-++ module ";" name)) (~ value)])))) ## members)] -## (return' (list (` (#VariantT (~ (untemplate-list members)))))))) +## (return (list (` (#VariantT (~ (untemplate-list members)))))))) ## (export' |) ## (defmacro (& members) @@ -724,7 +719,7 @@ ## (#Meta [_ (#Form (#Cons [(#Meta [_ (#Tag [module name])]) (#Cons [value #Nil])]))]) ## (` [(~ ($ text-++ module ";" name)) (~ value)])))) ## members)] -## (return' (list (` (#RecordT (~ (untemplate-list members)))))))) +## (return (list (` (#RecordT (~ (untemplate-list members)))))))) ## (export' &) ## (def (text:= x y) @@ -732,6 +727,10 @@ ## (jvm-invokevirtual java.lang.Object "equals" [java.lang.Object] ## x [y])) +## (def #export (int:+ x y) +## (-> Int Int Int) +## (jvm-ladd x y)) + ## (def (replace-ident ident value syntax) ## (-> (, Text Text) Syntax Syntax Syntax) ## (let [[module name] ident] @@ -776,7 +775,7 @@ ## args)] ## (case' rolled ## (#Meta [_ (#Form (#Cons [(#Meta [_ (#Tag ["lux" "AllT"])]) (#Cons [env (#Cons [(#Meta [_ (#Text "")]) (#Cons [(#Meta [_ (#Text arg-name)]) (#Cons [body #Nil])])])])]))]) -## (return' (list (` (#AllT (~ env) (~ (#Text name)) (~ (#Text arg-name)) +## (return (list (` (#AllT (~ env) (~ (#Text name)) (~ (#Text arg-name)) ## (~ (replace-ident arg-name (` (#BoundT (~ (#Text name)))) ## body))))))))) ## (export' All) @@ -876,7 +875,7 @@ ## (walk-type expansion') ## _ -## (fail' "Macro can't expand to more than 1 output."))) +## (fail "Macro can't expand to more than 1 output."))) ## #None ## (do' [args' (map% walk-type args)] @@ -890,35 +889,35 @@ ## ... ## (#Meta [_ (#Symbol _)]) -## (return' type) +## (return type) ## _ -## (fail' "Wrong syntax for walk-type"))) +## (fail "Wrong syntax for walk-type"))) ## (defmacro (->type tokens) ## (case' tokens ## (#Cons [type #Nil]) ## (do' [type' (walk-type type)] -## (return' (list type'))) +## (return (list type'))) ## _ -## (fail' "Wrong syntax for ->type"))) +## (fail "Wrong syntax for ->type"))) ## (defmacro (: tokens) ## (case' tokens ## (#Cons [type (#Cons [value #Nil])]) -## (return' (list (` (:' (->type (~ type)) (~ value))))) +## (return (list (` (:' (->type (~ type)) (~ value))))) ## _ -## (fail' "Wrong syntax for :"))) +## (fail "Wrong syntax for :"))) ## (defmacro (:! tokens) ## (case' tokens ## (#Cons [type (#Cons [value #Nil])]) -## (return' (list (` (:!' (->type (~ type)) (~ value))))) +## (return (list (` (:!' (->type (~ type)) (~ value))))) ## _ -## (fail' "Wrong syntax for :!"))) +## (fail "Wrong syntax for :!"))) @@ -1621,17 +1620,17 @@ ## #None ## (do' [flat-map% (map% walk-syntax args)] -## (return' (list (fold (lambda [fun arg] +## (return (list (fold (lambda [fun arg] ## (` (#AppT [(~ fun) (~ arg)]))) ## op ## args)))))) ## _ ## (do' [flat-map% (map% walk-syntax args)] -## (return' (list (_meta (#Form (list op args'))))))) +## (return (list (_meta (#Form (list op args'))))))) ## _ -## (return' (list type)))) +## (return (list type)))) ## (defsyntax #export (type type-syntax) ## (walk-syntax type-syntax)) |