diff options
Diffstat (limited to 'stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux')
-rw-r--r-- | stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux index 97bdb7a54..3eec3a5b4 100644 --- a/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux +++ b/stdlib/source/test/lux/tool/compiler/language/lux/analysis/inference.lux @@ -108,6 +108,8 @@ (_.cover [/.general] (and (|> (/.general archive.empty ..analysis expected (list)) (//type.expecting expected) + (//module.with 0 (product.left name)) + (/phase#each product.right) (/phase.result state) (try#each (|>> product.left (type#= expected))) (try.else false)) @@ -115,6 +117,8 @@ (type.function (list.repeated arity .Nat) expected) (list#each code.nat nats)) (//type.expecting expected) + (//module.with 0 (product.left name)) + (/phase#each product.right) (/phase.result state) (try#each (function (_ [actual analysis/*]) (and (type#= expected actual) @@ -126,6 +130,8 @@ (type (-> type/0 expected)) (list term/0)) (//type.expecting expected) + (//module.with 0 (product.left name)) + (/phase#each product.right) (/phase.result state) (try#each (|>> product.left (type#= expected))) (try.else false)) @@ -133,6 +139,8 @@ (type {.#Named name (-> type/0 expected)}) (list term/0)) (//type.expecting expected) + (//module.with 0 (product.left name)) + (/phase#each product.right) (/phase.result state) (try#each (|>> product.left (type#= expected))) (try.else false)) @@ -140,7 +148,9 @@ (type (All (_ a) (-> a a))) (list term/0)) (//type.expecting type/0) - (/phase#each (|>> product.left check.clean //type.check)) + (//module.with 0 (product.left name)) + (/phase#each product.right) + (/phase#each (|>> product.left (check.clean (list)) //type.check)) /phase#conjoint (/phase.result state) (try#each (type#= type/0)) @@ -149,6 +159,8 @@ (type ((All (_ a) (-> a a)) type/0)) (list term/0)) (//type.expecting type/0) + (//module.with 0 (product.left name)) + (/phase#each product.right) (/phase.result state) (try#each (|>> product.left (type#= type/0))) (try.else false)) @@ -157,11 +169,23 @@ _ (//type.check (check.check varT (type (-> type/0 expected))))] (/.general archive.empty ..analysis varT (list term/0))) (//type.expecting expected) - (/phase#each (|>> product.left check.clean //type.check)) + (//module.with 0 (product.left name)) + (/phase#each product.right) + (/phase#each (|>> product.left (check.clean (list)) //type.check)) /phase#conjoint (/phase.result state) (try#each (type#= expected)) (try.else false)) + (|> (/.general archive.empty ..analysis + (type (Ex (_ a) (-> a a))) + (list (` ("lux io error" "")))) + //type.inferring + (//module.with 0 (product.left name)) + (/phase#each (|>> product.right product.left (check.clean (list)) //type.check)) + /phase#conjoint + (/phase.result state) + (try#each //type.existential?) + (try.else false)) )) (_.cover [/.cannot_infer] (and (|> (/.general archive.empty ..analysis expected (list term/0)) @@ -179,19 +203,9 @@ (type (-> expected expected)) (list term/0)) (//type.expecting expected) - (/phase.result state) - (..fails? /.cannot_infer_argument))) - (_.cover [/.existential?] - (|> (/.general archive.empty ..analysis - (type (Ex (_ a) (-> a a))) - (list (` ("lux io error" "")))) - //type.inferring (//module.with 0 (product.left name)) - (/phase#each (|>> product.right product.left check.clean //type.check)) - /phase#conjoint (/phase.result state) - (try#each /.existential?) - (try.else false))) + (..fails? /.cannot_infer_argument))) ))) (def: test|variant |