diff options
19 files changed, 71 insertions, 71 deletions
diff --git a/new-luxc/source/luxc/lang.lux b/new-luxc/source/luxc/lang.lux index 373c6b12b..844cc6755 100644 --- a/new-luxc/source/luxc/lang.lux +++ b/new-luxc/source/luxc/lang.lux @@ -40,7 +40,7 @@ (:: meta;Monad<Meta> (~' wrap) []) (;;throw (~ exception) (~ message))))))) -(def: #export (with-expected-type expected action) +(def: #export (with-type expected action) (All [a] (-> Type (Meta a) (Meta a))) (function [compiler] (case (action (set@ #;expected (#;Some expected) compiler)) diff --git a/new-luxc/source/luxc/lang/analysis/common.lux b/new-luxc/source/luxc/lang/analysis/common.lux index 2f3e3a37d..95355d62f 100644 --- a/new-luxc/source/luxc/lang/analysis/common.lux +++ b/new-luxc/source/luxc/lang/analysis/common.lux @@ -14,7 +14,7 @@ (All [a] (-> (Meta a) (Meta [Type a]))) (do meta;Monad<Meta> [[_ varT] (&;with-type-env tc;var) - analysis (&;with-expected-type varT + analysis (&;with-type varT action) knownT (&;with-type-env (tc;clean varT))] (wrap [knownT analysis]))) diff --git a/new-luxc/source/luxc/lang/analysis/function.lux b/new-luxc/source/luxc/lang/analysis/function.lux index 5403026cb..611e5c8a4 100644 --- a/new-luxc/source/luxc/lang/analysis/function.lux +++ b/new-luxc/source/luxc/lang/analysis/function.lux @@ -77,7 +77,7 @@ ## also to themselves, through a local variable. (&scope;with-local [func-name expectedT]) (&scope;with-local [arg-name inputT]) - (&;with-expected-type outputT) + (&;with-type outputT) (analyse body)) _ diff --git a/new-luxc/source/luxc/lang/analysis/inference.lux b/new-luxc/source/luxc/lang/analysis/inference.lux index 080a6c620..cccaa774a 100644 --- a/new-luxc/source/luxc/lang/analysis/inference.lux +++ b/new-luxc/source/luxc/lang/analysis/inference.lux @@ -113,7 +113,7 @@ (function [_] (Cannot-Infer-Argument (format "Inferred Type: " (%type inputT) "\n" " Argument: " (%code argC)))) - (&;with-expected-type inputT + (&;with-type inputT (analyse argC)))] (wrap [outputT' (list& argA args'A)])) diff --git a/new-luxc/source/luxc/lang/analysis/procedure/common.lux b/new-luxc/source/luxc/lang/analysis/procedure/common.lux index be77e643c..a643cb76a 100644 --- a/new-luxc/source/luxc/lang/analysis/procedure/common.lux +++ b/new-luxc/source/luxc/lang/analysis/procedure/common.lux @@ -56,7 +56,7 @@ [_ (&;infer outputT) argsA (monad;map @ (function [[argT argC]] - (&;with-expected-type argT + (&;with-type argT (analyse argC))) (list;zip2 inputsT+ args))] (wrap (la;procedure proc argsA))) @@ -98,7 +98,7 @@ (do meta;Monad<Meta> [[var-id varT] (&;with-type-env tc;var) _ (&;infer (type (Either Text varT))) - opA (&;with-expected-type (type (io;IO varT)) + opA (&;with-type (type (io;IO varT)) (analyse opC))] (wrap (la;procedure proc (list opA)))) @@ -148,7 +148,7 @@ (^ (list valueC)) (do meta;Monad<Meta> [_ (&;infer (type Type)) - valueA (&;with-expected-type Type + valueA (&;with-type Type (analyse valueC))] (wrap valueA)) @@ -342,7 +342,7 @@ (do meta;Monad<Meta> [[var-id varT] (&;with-type-env tc;var) _ (&;infer (type (Atom varT))) - initA (&;with-expected-type varT + initA (&;with-type varT (analyse initC))] (wrap (la;procedure proc (list initA)))) diff --git a/new-luxc/source/luxc/lang/analysis/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/analysis/procedure/host.jvm.lux index c6a456441..8f5382d2b 100644 --- a/new-luxc/source/luxc/lang/analysis/procedure/host.jvm.lux +++ b/new-luxc/source/luxc/lang/analysis/procedure/host.jvm.lux @@ -197,7 +197,7 @@ (do meta;Monad<Meta> [_ (&;infer Nat) [var-id varT] (&;with-type-env tc;var) - arrayA (&;with-expected-type (type (Array varT)) + arrayA (&;with-type (type (Array varT)) (analyse arrayC))] (wrap (la;procedure proc (list arrayA)))) @@ -210,7 +210,7 @@ (case args (^ (list lengthC)) (do meta;Monad<Meta> - [lengthA (&;with-expected-type Nat + [lengthA (&;with-type Nat (analyse lengthC)) expectedT meta;expected-type [level elem-class] (: (Meta [Nat Text]) @@ -303,12 +303,12 @@ (do meta;Monad<Meta> [[var-id varT] (&;with-type-env tc;var) _ (&;infer varT) - arrayA (&;with-expected-type (type (Array varT)) + arrayA (&;with-type (type (Array varT)) (analyse arrayC)) ?elemT (&;with-type-env (tc;read var-id)) [elemT elem-class] (box-array-element-type (maybe;default varT ?elemT)) - idxA (&;with-expected-type Nat + idxA (&;with-type Nat (analyse idxC))] (wrap (la;procedure proc (list (code;text elem-class) idxA arrayA)))) @@ -323,14 +323,14 @@ (do meta;Monad<Meta> [[var-id varT] (&;with-type-env tc;var) _ (&;infer (type (Array varT))) - arrayA (&;with-expected-type (type (Array varT)) + arrayA (&;with-type (type (Array varT)) (analyse arrayC)) ?elemT (&;with-type-env (tc;read var-id)) [valueT elem-class] (box-array-element-type (maybe;default varT ?elemT)) - idxA (&;with-expected-type Nat + idxA (&;with-type Nat (analyse idxC)) - valueA (&;with-expected-type valueT + valueA (&;with-type valueT (analyse valueC))] (wrap (la;procedure proc (list (code;text elem-class) idxA valueA arrayA)))) diff --git a/new-luxc/source/luxc/lang/analysis/structure.lux b/new-luxc/source/luxc/lang/analysis/structure.lux index 3048d4a4e..76b5a3a42 100644 --- a/new-luxc/source/luxc/lang/analysis/structure.lux +++ b/new-luxc/source/luxc/lang/analysis/structure.lux @@ -45,7 +45,7 @@ (case (list;nth tag flat) (#;Some variant-type) (do @ - [valueA (&;with-expected-type variant-type + [valueA (&;with-type variant-type (analyse valueC)) temp &scope;next-local] (wrap (la;sum tag type-size temp valueA))) @@ -54,7 +54,7 @@ (&common;variant-out-of-bounds-error expectedT type-size tag))) (#;Named name unnamedT) - (&;with-expected-type unnamedT + (&;with-type unnamedT (analyse-sum analyse tag valueC)) (#;Var id) @@ -63,7 +63,7 @@ (tc;read id))] (case ?expectedT' (#;Some expectedT') - (&;with-expected-type expectedT' + (&;with-type expectedT' (analyse-sum analyse tag valueC)) _ @@ -79,7 +79,7 @@ (<tag> _) (do @ [[instance-id instanceT] (&;with-type-env <instancer>)] - (&;with-expected-type (maybe;assume (type;apply (list instanceT) expectedT)) + (&;with-type (maybe;assume (type;apply (list instanceT) expectedT)) (analyse-sum analyse tag valueC)))) ([#;UnivQ tc;existential] [#;ExQ tc;var]) @@ -91,7 +91,7 @@ [?funT' (&;with-type-env (tc;read funT-id))] (case ?funT' (#;Some funT') - (&;with-expected-type (#;Apply inputT funT') + (&;with-type (#;Apply inputT funT') (analyse-sum analyse tag valueC)) _ @@ -105,7 +105,7 @@ (&;throw Not-Quantified-Type (%type funT)) (#;Some outputT) - (&;with-expected-type outputT + (&;with-type outputT (analyse-sum analyse tag valueC)))) _ @@ -123,14 +123,14 @@ ## If the tuple runs out, whatever expression is the last gets ## matched to the remaining type. [tailT (#;Cons tailC #;Nil)] - (&;with-expected-type tailT + (&;with-type tailT (analyse tailC)) ## If the type and the code are still ongoing, match each ## sub-expression to its corresponding type. [(#;Product leftT rightT) (#;Cons leftC rightC)] (do @ - [leftA (&;with-expected-type leftT + [leftA (&;with-type leftT (analyse leftC)) rightA (recur rightT rightC)] (wrap (` [(~ leftA) (~ rightA)]))) @@ -155,7 +155,7 @@ [tailT tailC] (do @ [g!tail (meta;gensym "tail")] - (&;with-expected-type tailT + (&;with-type tailT (analyse (` ("lux case" [(~@ tailC)] (~ g!tail) (~ g!tail)))))) @@ -173,7 +173,7 @@ (analyse-typed-product analyse membersC) (#;Named name unnamedT) - (&;with-expected-type unnamedT + (&;with-type unnamedT (analyse-product analyse membersC)) (#;Var id) @@ -182,7 +182,7 @@ (tc;read id))] (case ?expectedT' (#;Some expectedT') - (&;with-expected-type expectedT' + (&;with-type expectedT' (analyse-product analyse membersC)) _ @@ -199,7 +199,7 @@ (<tag> _) (do @ [[instance-id instanceT] (&;with-type-env <instancer>)] - (&;with-expected-type (maybe;assume (type;apply (list instanceT) expectedT)) + (&;with-type (maybe;assume (type;apply (list instanceT) expectedT)) (analyse-product analyse membersC)))) ([#;UnivQ tc;existential] [#;ExQ tc;var]) @@ -211,7 +211,7 @@ [?funT' (&;with-type-env (tc;read funT-id))] (case ?funT' (#;Some funT') - (&;with-expected-type (#;Apply inputT funT') + (&;with-type (#;Apply inputT funT') (analyse-product analyse membersC)) _ @@ -224,7 +224,7 @@ (&;throw Not-Quantified-Type (%type funT)) (#;Some outputT) - (&;with-expected-type outputT + (&;with-type outputT (analyse-product analyse membersC)))) _ diff --git a/new-luxc/source/luxc/lang/analysis/type.lux b/new-luxc/source/luxc/lang/analysis/type.lux index 4184dd0c0..eb3de08de 100644 --- a/new-luxc/source/luxc/lang/analysis/type.lux +++ b/new-luxc/source/luxc/lang/analysis/type.lux @@ -15,7 +15,7 @@ [actualT (eval Type type) #let [actualT (:! Type actualT)] _ (&;infer actualT)] - (&;with-expected-type actualT + (&;with-type actualT (analyse value)))) (def: #export (analyse-coerce analyse eval type value) @@ -23,5 +23,5 @@ (do meta;Monad<Meta> [actualT (eval Type type) _ (&;infer (:! Type actualT))] - (&;with-expected-type Top + (&;with-type Top (analyse value)))) diff --git a/new-luxc/source/luxc/lang/eval.lux b/new-luxc/source/luxc/lang/eval.lux index 20c3acaeb..265320dbe 100644 --- a/new-luxc/source/luxc/lang/eval.lux +++ b/new-luxc/source/luxc/lang/eval.lux @@ -11,7 +11,7 @@ (def: #export (eval type exprC) &;Eval (do meta;Monad<Meta> - [exprA (&;with-expected-type type + [exprA (&;with-type type (expressionA;analyser eval exprC)) #let [exprS (expressionS;synthesize exprA)] exprI (expressionT;translate exprS)] diff --git a/new-luxc/source/luxc/lang/translation.lux b/new-luxc/source/luxc/lang/translation.lux index e573aa3ae..88fc25d3a 100644 --- a/new-luxc/source/luxc/lang/translation.lux +++ b/new-luxc/source/luxc/lang/translation.lux @@ -9,6 +9,7 @@ (coll [dict])) [meta] (meta (type ["tc" check])) + (lang [syntax]) [host] [io] (world [file #+ File])) @@ -18,7 +19,6 @@ [";L" host] (host [";H" macro] ["$" jvm]) - ["&;" syntax] (analysis [";A" expression] [";A" common]) (synthesis [";S" expression]) @@ -41,7 +41,7 @@ (-> Code (Meta [$;Inst Code])) (do meta;Monad<Meta> [[_ annsA] (&;with-scope - (&;with-expected-type Code + (&;with-type Code (analyse annsC))) annsI (expressionT;translate (expressionS;synthesize annsA)) annsV (evalT;eval annsI)] @@ -58,7 +58,7 @@ [_ valueT valueA] (&;with-scope (if (meta;type? (:! Code annsV)) (do @ - [valueA (&;with-expected-type Type + [valueA (&;with-type Type (analyse valueC))] (wrap [Type valueA])) (commonA;with-unknown-type @@ -73,7 +73,7 @@ (^code ("lux program" (~ [_ (#;Symbol ["" program-args])]) (~ programC))) (do meta;Monad<Meta> [[_ programA] (&;with-scope - (&;with-expected-type (type (io;IO Unit)) + (&;with-type (type (io;IO Unit)) (analyse programC))) programI (expressionT;translate (expressionS;synthesize programA))] (statementT;translate-program program-args programI)) @@ -111,7 +111,7 @@ ((exhaust action) compiler') (#e;Error error) - (if (ex;match? &syntax;End-Of-File error) + (if (ex;match? syntax;End-Of-File error) (#e;Success [compiler []]) (#e;Error error))))) @@ -129,7 +129,7 @@ (def: (parse current-module) (-> Text (Meta Code)) (function [compiler] - (case (&syntax;parse current-module (get@ #;source compiler)) + (case (syntax;parse current-module (get@ #;source compiler)) (#e;Error error) (#e;Error error) diff --git a/new-luxc/test/test/luxc/lang/analysis/case.lux b/new-luxc/test/test/luxc/lang/analysis/case.lux index ee8b9b74d..6d34ef4c5 100644 --- a/new-luxc/test/test/luxc/lang/analysis/case.lux +++ b/new-luxc/test/test/luxc/lang/analysis/case.lux @@ -169,7 +169,7 @@ ($_ seq (test "Will reject empty pattern-matching (no branches)." (|> (&;with-scope - (&;with-expected-type outputT + (&;with-type outputT (@;analyse-case analyse inputC (list)))) check-failure)) (test "Can analyse exhaustive pattern-matching." @@ -182,7 +182,7 @@ (#;Named [module-name record-name] (type;tuple primitivesT)))] (&;with-scope - (&;with-expected-type outputT + (&;with-type outputT (@;analyse-case analyse inputC exhaustive-branchesC))))) check-success)) (test "Will reject non-exhaustive pattern-matching." @@ -195,7 +195,7 @@ (#;Named [module-name record-name] (type;tuple primitivesT)))] (&;with-scope - (&;with-expected-type outputT + (&;with-type outputT (@;analyse-case analyse inputC non-exhaustive-branchesC))))) check-failure)) (test "Will reject redundant pattern-matching." @@ -208,7 +208,7 @@ (#;Named [module-name record-name] (type;tuple primitivesT)))] (&;with-scope - (&;with-expected-type outputT + (&;with-type outputT (@;analyse-case analyse inputC redundant-branchesC))))) check-failure)) (test "Will reject pattern-matching if the bodies of the branches do not all have the same type." @@ -221,7 +221,7 @@ (#;Named [module-name record-name] (type;tuple primitivesT)))] (&;with-scope - (&;with-expected-type outputT + (&;with-type outputT (@;analyse-case analyse inputC heterogeneous-branchesC))))) check-failure)) )))) diff --git a/new-luxc/test/test/luxc/lang/analysis/function.lux b/new-luxc/test/test/luxc/lang/analysis/function.lux index e08e7a9bd..6cddfebd2 100644 --- a/new-luxc/test/test/luxc/lang/analysis/function.lux +++ b/new-luxc/test/test/luxc/lang/analysis/function.lux @@ -72,16 +72,16 @@ [inputT _] gen-primitive] ($_ seq (test "Can analyse function." - (|> (&;with-expected-type (type (All [a] (-> a outputT))) + (|> (&;with-type (type (All [a] (-> a outputT))) (@;analyse-function analyse func-name arg-name outputC)) (meta;run (init-compiler [])) succeeds?)) (test "Generic functions can always be specialized." - (and (|> (&;with-expected-type (-> inputT outputT) + (and (|> (&;with-type (-> inputT outputT) (@;analyse-function analyse func-name arg-name outputC)) (meta;run (init-compiler [])) succeeds?) - (|> (&;with-expected-type (-> inputT inputT) + (|> (&;with-type (-> inputT inputT) (@;analyse-function analyse func-name arg-name (code;symbol ["" arg-name]))) (meta;run (init-compiler [])) succeeds?))) @@ -96,7 +96,7 @@ (meta;run (init-compiler [])) (check-type (type (All [a] (-> a a)))))) (test "The function's name is bound to the function's type." - (|> (&;with-expected-type (type (Rec self (-> inputT self))) + (|> (&;with-type (type (Rec self (-> inputT self))) (@;analyse-function analyse func-name arg-name (code;symbol ["" func-name]))) (meta;run (init-compiler [])) succeeds?)) 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 dae39228f..3420ebb4d 100644 --- a/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux +++ b/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux @@ -28,7 +28,7 @@ [(def: (<name> procedure params output-type) (-> Text (List Code) Type Bool) (|> (&;with-scope - (&;with-expected-type output-type + (&;with-type output-type (@;analyse-procedure analyse evalL;eval procedure params))) (meta;run (init-compiler [])) (case> (#e;Success _) @@ -262,7 +262,7 @@ (test "Can get a value inside an array." (|> (&scope;with-scope "" (&scope;with-local [var-name arrayT] - (&;with-expected-type elemT + (&;with-type elemT (@;analyse-procedure analyse evalL;eval "lux array get" (list idxC (code;symbol ["" var-name])))))) @@ -275,7 +275,7 @@ (test "Can put a value inside an array." (|> (&scope;with-scope "" (&scope;with-local [var-name arrayT] - (&;with-expected-type arrayT + (&;with-type arrayT (@;analyse-procedure analyse evalL;eval "lux array put" (list idxC elemC @@ -289,7 +289,7 @@ (test "Can remove a value from an array." (|> (&scope;with-scope "" (&scope;with-local [var-name arrayT] - (&;with-expected-type arrayT + (&;with-type arrayT (@;analyse-procedure analyse evalL;eval "lux array remove" (list idxC (code;symbol ["" var-name])))))) @@ -302,7 +302,7 @@ (test "Can query the size of an array." (|> (&scope;with-scope "" (&scope;with-local [var-name arrayT] - (&;with-expected-type Nat + (&;with-type Nat (@;analyse-procedure analyse evalL;eval "lux array size" (list (code;symbol ["" var-name])))))) (meta;run (init-compiler [])) @@ -362,7 +362,7 @@ (test "Can read the value of an atomic reference." (|> (&scope;with-scope "" (&scope;with-local [var-name atomT] - (&;with-expected-type elemT + (&;with-type elemT (@;analyse-procedure analyse evalL;eval "lux atom read" (list (code;symbol ["" var-name])))))) (meta;run (init-compiler [])) @@ -374,7 +374,7 @@ (test "Can swap the value of an atomic reference." (|> (&scope;with-scope "" (&scope;with-local [var-name atomT] - (&;with-expected-type Bool + (&;with-type Bool (@;analyse-procedure analyse evalL;eval "lux atom compare-and-swap" (list elemC elemC 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 3d5da350a..783174777 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 @@ -36,7 +36,7 @@ (|> (do Monad<Meta> [runtime-bytecode @runtime;translate] (&;with-scope - (&;with-expected-type output-type + (&;with-type output-type (@;analyse-procedure analyse evalL;eval procedure params)))) (meta;run (init-compiler [])) (case> (#e;Success _) diff --git a/new-luxc/test/test/luxc/lang/analysis/structure.lux b/new-luxc/test/test/luxc/lang/analysis/structure.lux index b299872ca..8cc95fd88 100644 --- a/new-luxc/test/test/luxc/lang/analysis/structure.lux +++ b/new-luxc/test/test/luxc/lang/analysis/structure.lux @@ -45,7 +45,7 @@ ($_ seq (test "Can analyse sum." (|> (&;with-scope - (&;with-expected-type variantT + (&;with-type variantT (@;analyse-sum analyse choice valueC))) (meta;run (init-compiler [])) (case> (^multi (#e;Success [_ sumA]) @@ -62,7 +62,7 @@ [[_ varT] (&;with-type-env tc;var) _ (&;with-type-env (tc;check varT variantT))] - (&;with-expected-type varT + (&;with-type varT (@;analyse-sum analyse choice valueC)))) (meta;run (init-compiler [])) (case> (^multi (#e;Success [_ sumA]) @@ -77,7 +77,7 @@ (|> (&;with-scope (do meta;Monad<Meta> [[_ varT] (&;with-type-env tc;var)] - (&;with-expected-type varT + (&;with-type varT (@;analyse-sum analyse choice valueC)))) (meta;run (init-compiler [])) (case> (#e;Success _) @@ -87,7 +87,7 @@ true))) (test "Can analyse sum through existential quantification." (|> (&;with-scope - (&;with-expected-type (type;ex-q +1 +variantT) + (&;with-type (type;ex-q +1 +variantT) (@;analyse-sum analyse +choice +valueC))) (meta;run (init-compiler [])) (case> (#e;Success _) @@ -97,7 +97,7 @@ false))) (test "Can analyse sum through universal quantification." (|> (&;with-scope - (&;with-expected-type (type;univ-q +1 +variantT) + (&;with-type (type;univ-q +1 +variantT) (@;analyse-sum analyse +choice +valueC))) (meta;run (init-compiler [])) (case> (#e;Success _) @@ -121,7 +121,7 @@ +tupleT (type;tuple (list/map product;left +primitives))]] ($_ seq (test "Can analyse product." - (|> (&;with-expected-type (type;tuple (list/map product;left primitives)) + (|> (&;with-type (type;tuple (list/map product;left primitives)) (@;analyse-product analyse (list/map product;right primitives))) (meta;run (init-compiler [])) (case> (#e;Success tupleA) @@ -141,7 +141,7 @@ _ false))) (test "Can analyse pseudo-product (singleton tuple)" - (|> (&;with-expected-type singletonT + (|> (&;with-type singletonT (analyse (` [(~ singletonC)]))) (meta;run (init-compiler [])) (case> (#e;Success singletonA) @@ -155,7 +155,7 @@ [[_ varT] (&;with-type-env tc;var) _ (&;with-type-env (tc;check varT (type;tuple (list/map product;left primitives))))] - (&;with-expected-type varT + (&;with-type varT (@;analyse-product analyse (list/map product;right primitives))))) (meta;run (init-compiler [])) (case> (#e;Success [_ tupleA]) @@ -165,7 +165,7 @@ false))) (test "Can analyse product through existential quantification." (|> (&;with-scope - (&;with-expected-type (type;ex-q +1 +tupleT) + (&;with-type (type;ex-q +1 +tupleT) (@;analyse-product analyse (list/map product;right +primitives)))) (meta;run (init-compiler [])) (case> (#e;Success _) @@ -175,7 +175,7 @@ false))) (test "Cannot analyse product through universal quantification." (|> (&;with-scope - (&;with-expected-type (type;univ-q +1 +tupleT) + (&;with-type (type;univ-q +1 +tupleT) (@;analyse-product analyse (list/map product;right +primitives)))) (meta;run (init-compiler [])) (case> (#e;Success _) @@ -265,7 +265,7 @@ (do meta;Monad<Meta> [_ (@module;declare-tags tags false named-polyT)] (&;with-scope - (&;with-expected-type variantT + (&;with-type variantT (@;analyse-tagged-sum analyse [module-name other-choice-tag] other-choiceC))))) (meta;run (init-compiler [])) (case> (^multi (#e;Success [_ _ sumA]) @@ -321,7 +321,7 @@ (do meta;Monad<Meta> [_ (@module;declare-tags tags false named-polyT)] (&;with-scope - (&;with-expected-type tupleT + (&;with-type tupleT (@;analyse-record analyse recordC))))) (meta;run (init-compiler [])) (case> (^multi (#e;Success [_ _ productA]) diff --git a/new-luxc/test/tests.lux b/new-luxc/test/tests.lux index 88d89ad90..b36782517 100644 --- a/new-luxc/test/tests.lux +++ b/new-luxc/test/tests.lux @@ -5,8 +5,7 @@ (concurrency [promise]) [cli #+ program:] [test]) - (test (luxc (lang ["_;L" syntax] - (analysis ["_;A" primitive] + (test (luxc (lang (analysis ["_;A" primitive] ["_;A" structure] ["_;A" reference] ["_;A" case] diff --git a/new-luxc/source/luxc/lang/syntax.lux b/stdlib/source/lux/lang/syntax.lux index 9fe4939a2..9fe4939a2 100644 --- a/new-luxc/source/luxc/lang/syntax.lux +++ b/stdlib/source/lux/lang/syntax.lux diff --git a/new-luxc/test/test/luxc/lang/syntax.lux b/stdlib/test/test/lux/lang/syntax.lux index 0f2306eb1..4db181cae 100644 --- a/new-luxc/test/test/luxc/lang/syntax.lux +++ b/stdlib/test/test/lux/lang/syntax.lux @@ -10,8 +10,8 @@ (coll [list])) ["r" math/random "r/" Monad<Random>] (meta [code]) - test) - (luxc (lang ["&" syntax]))) + (lang ["&" syntax]) + test)) (def: default-cursor Cursor diff --git a/stdlib/test/tests.lux b/stdlib/test/tests.lux index aa816c4d3..ea0aa72f7 100644 --- a/stdlib/test/tests.lux +++ b/stdlib/test/tests.lux @@ -70,6 +70,7 @@ (type ["_;" check] ["_;" auto] ["_;" object])) + (lang ["lang_;" syntax]) (world ["_;" blob] ["_;" file] (net ["_;" tcp] |