diff options
Diffstat (limited to 'new-luxc/test')
11 files changed, 18 insertions, 18 deletions
diff --git a/new-luxc/test/test/luxc/common.lux b/new-luxc/test/test/luxc/common.lux index 40e06ae84..49f294a68 100644 --- a/new-luxc/test/test/luxc/common.lux +++ b/new-luxc/test/test/luxc/common.lux @@ -55,7 +55,7 @@ (def: (runner translate-runtime translate-expression eval init) (All [a] (-> (Meta Top) (-> Synthesis (Meta a)) (-> a (Meta Top)) (IO Compiler) Runner)) - (function [synthesis] + (function (_ synthesis) (|> (do macro.Monad<Meta> [_ translate-runtime sampleO (translate-expression synthesis)] @@ -67,7 +67,7 @@ (All [a] (-> (Meta Top) (-> Synthesis (Meta a)) (-> a (Meta Top)) (IO Compiler) (-> Text Type a Code (Meta Top)) Definer)) - (function [[module-name def-name] synthesis] + (function (_ [module-name def-name] synthesis) (|> (do macro.Monad<Meta> [_ translate-runtime valueO (translate-expression synthesis) diff --git a/new-luxc/test/test/luxc/lang/analysis/case.lux b/new-luxc/test/test/luxc/lang/analysis/case.lux index 50d31a86e..bcb9943bb 100644 --- a/new-luxc/test/test/luxc/lang/analysis/case.lux +++ b/new-luxc/test/test/luxc/lang/analysis/case.lux @@ -92,10 +92,10 @@ (^ [_ (#.Form (list [_ (#.Tag _)] _))]) (do r.Monad<Random> [bundles (monad.map @ - (function [[_tag _code]] + (function (_ [_tag _code]) (do @ [v-branches (exhaustive-branches allow-literals? variantTC _code)] - (wrap (L/map (function [pattern] (` ((~ _tag) (~ pattern)))) + (wrap (L/map (function (_ pattern) (` ((~ _tag) (~ pattern)))) v-branches)))) variantTC)] (wrap (L/join bundles))) @@ -107,7 +107,7 @@ (def: #export (input variant-tags record-tags primitivesC) (-> (List Code) (List Code) (List Code) (r.Random Code)) (r.rec - (function [input] + (function (_ input) ($_ r.either (r/map product.right gen-primitive) (do r.Monad<Random> diff --git a/new-luxc/test/test/luxc/lang/analysis/primitive.lux b/new-luxc/test/test/luxc/lang/analysis/primitive.lux index 96e2c62f9..572766820 100644 --- a/new-luxc/test/test/luxc/lang/analysis/primitive.lux +++ b/new-luxc/test/test/luxc/lang/analysis/primitive.lux @@ -46,7 +46,7 @@ (macro.run (io.run init-jvm)) (case> (#e.Success [_type [_ (<tag> value)]]) (and (type/= <type> _type) - (is <value> value)) + (is? <value> value)) _ false)) diff --git a/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux b/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux index 0cecc3bd0..807a9f3d8 100644 --- a/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux +++ b/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux @@ -256,7 +256,7 @@ var-name (r.text +5) #let [arrayT (type (Array elemT)) g!array (code.local-symbol var-name) - array-operation (function [output-type code] + array-operation (function (_ output-type code) (|> (&scope.with-scope "" (&scope.with-local [var-name arrayT] (&.with-type output-type diff --git a/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux b/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux index efc550ff5..77fb71d27 100644 --- a/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux +++ b/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux @@ -284,7 +284,7 @@ ("jvm array new" (~ (code.nat size))))) boxedT (#.Primitive boxed (list)) boxedTC (` (+0 (~ (code.text boxed)) (+0))) - multi-arrayT (list/fold (function [_ innerT] + multi-arrayT (list/fold (function (_ _ innerT) (|> innerT (list) (#.Primitive "#Array"))) boxedT (list.n/range +1 level))]] @@ -330,7 +330,7 @@ (do @ [[unboxed boxed] array-type [!unboxed !boxed] (|> array-type - (r.filter (function [[!unboxed !boxed]] + (r.filter (function (_ [!unboxed !boxed]) (not (text/= boxed !boxed))))) #let [boxedT (#.Primitive boxed (list)) boxedC (`' ("lux check" (+0 (~ (code.text boxed)) (+0)) @@ -341,7 +341,7 @@ ("jvm object null")))] throwable (|> r.nat (:: @ map (n/% (n/inc (list.size throwables)))) - (:: @ map (function [idx] + (:: @ map (function (_ idx) (|> throwables (list.nth idx) (maybe.default "java.lang.Object"))))) diff --git a/new-luxc/test/test/luxc/lang/synthesis/function.lux b/new-luxc/test/test/luxc/lang/synthesis/function.lux index bb3aa9204..c73793c8d 100644 --- a/new-luxc/test/test/luxc/lang/synthesis/function.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/function.lux @@ -23,7 +23,7 @@ (def: gen-function//constant (r.Random [Nat la.Analysis la.Analysis]) (r.rec - (function [gen-function//constant] + (function (_ gen-function//constant) (do r.Monad<Random> [function? r.bool] (if function? @@ -51,7 +51,7 @@ (loop [num-args +1 global-env relative-env] (let [env-size (list.size global-env) - resolver (list/fold (function [[idx var] resolver] + resolver (list/fold (function (_ [idx var] resolver) (dict.put idx var resolver)) (: (Dict Nat Int) (dict.new number.Hash<Nat>)) @@ -65,7 +65,7 @@ picks (|> (r.set number.Hash<Nat> num-picks (pick env-size)) (:: @ map set.to-list)) [total-args prediction bodyA] (recur (n/inc num-args) - (list/map (function [pick] (maybe.assume (list.nth pick global-env))) + (list/map (function (_ pick) (maybe.assume (list.nth pick global-env))) picks))] (wrap [total-args prediction (` ("lux function" [(~+ (list/map (|>> variableL.captured code.int) picks))] (~ bodyA)))])) diff --git a/new-luxc/test/test/luxc/lang/synthesis/primitive.lux b/new-luxc/test/test/luxc/lang/synthesis/primitive.lux index 57064afd9..d2298193f 100644 --- a/new-luxc/test/test/luxc/lang/synthesis/primitive.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/primitive.lux @@ -33,7 +33,7 @@ [(test (format "Can synthesize " <desc> ".") (|> (expressionS.synthesize extensionL.no-syntheses (<analysis> <sample>)) (case> [_ (<synthesis> value)] - (is <sample> value) + (is? <sample> value) _ false)))] diff --git a/new-luxc/test/test/luxc/lang/translation/case.lux b/new-luxc/test/test/luxc/lang/translation/case.lux index 05b1cd768..ca960dba4 100644 --- a/new-luxc/test/test/luxc/lang/translation/case.lux +++ b/new-luxc/test/test/luxc/lang/translation/case.lux @@ -26,7 +26,7 @@ (def: gen-case (r.Random [ls.Synthesis ls.Path]) - (<| r.rec (function [gen-case]) + (<| r.rec (function (_ gen-case)) (`` ($_ r.either (r/wrap [(' []) (' ("lux case pop"))]) (~~ (do-template [<gen> <synth>] diff --git a/new-luxc/test/test/luxc/lang/translation/common.lux b/new-luxc/test/test/luxc/lang/translation/common.lux index 23afaac36..6de3ad822 100644 --- a/new-luxc/test/test/luxc/lang/translation/common.lux +++ b/new-luxc/test/test/luxc/lang/translation/common.lux @@ -443,7 +443,7 @@ (#e.Error error) false))) - (let [test-clip (function [from to expected] + (let [test-clip (function (_ from to expected) (|> (run (` ("lux text clip" (~ concatenatedS) (~ (code.nat from)) diff --git a/new-luxc/test/test/luxc/lang/translation/jvm.lux b/new-luxc/test/test/luxc/lang/translation/jvm.lux index a0c8a5ed5..0ece8db82 100644 --- a/new-luxc/test/test/luxc/lang/translation/jvm.lux +++ b/new-luxc/test/test/luxc/lang/translation/jvm.lux @@ -548,7 +548,7 @@ (lang.with-current-module "") (macro.run (io.run init-jvm)) (case> (#e.Success outputT) - (is hostL.unit (:! Text outputT)) + (is? hostL.unit (:! Text outputT)) (#e.Error error) false))) diff --git a/new-luxc/test/test/luxc/lang/translation/reference.lux b/new-luxc/test/test/luxc/lang/translation/reference.lux index 05f3d8a84..3c2b66b2d 100644 --- a/new-luxc/test/test/luxc/lang/translation/reference.lux +++ b/new-luxc/test/test/luxc/lang/translation/reference.lux @@ -26,7 +26,7 @@ (def: ident-part (r.Random Text) (|> (r.text' upper-alpha-ascii +5) - (r.filter (function [sample] + (r.filter (function (_ sample) (not (or (text.contains? "/" sample) (text.contains? "[" sample) (text.contains? "]" sample))))))) |