diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lux/analyser/case.clj | 2 | ||||
-rw-r--r-- | src/lux/analyser/host.clj | 2 | ||||
-rw-r--r-- | src/lux/type.clj | 24 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/lux/analyser/case.clj b/src/lux/analyser/case.clj index 9640cf88a..ca4e0edeb 100644 --- a/src/lux/analyser/case.clj +++ b/src/lux/analyser/case.clj @@ -67,7 +67,7 @@ (&type/with-var (fn [$var] (|do [=type (&type/apply-type type $var)] - (adjust-type* (&/Cons$ (&/T _aenv 0 $var) (&/|map update-up-frame up)) =type)))) + (adjust-type* (&/Cons$ (&/T _aenv 1 $var) (&/|map update-up-frame up)) =type)))) (&/$TupleT ?members) (|do [(&/$TupleT ?members*) (&/fold% (fn [_abody ena] diff --git a/src/lux/analyser/host.clj b/src/lux/analyser/host.clj index 33553985b..7e1f92d19 100644 --- a/src/lux/analyser/host.clj +++ b/src/lux/analyser/host.clj @@ -126,7 +126,7 @@ (|do [:let [[idx types] idx+types] [idx* real-type] (clean-gtype-var idx gtype-var)] (return (&/T idx* (&/Cons$ real-type types))))) - (&/T 0 (&/|list)) + (&/T 1 (&/|list)) gtype-vars)] (return clean-types))) diff --git a/src/lux/type.clj b/src/lux/type.clj index fb9c63783..6ae542b68 100644 --- a/src/lux/type.clj +++ b/src/lux/type.clj @@ -57,7 +57,7 @@ (def IO (Named$ (&/T "lux/data" "IO") (Univ$ empty-env - (Lambda$ Unit (Bound$ 0))))) + (Lambda$ Unit (Bound$ 1))))) (def List (Named$ (&/T "lux" "List") @@ -66,9 +66,9 @@ ;; lux;Nil Unit ;; lux;Cons - (Tuple$ (&/|list (Bound$ 0) - (App$ (Bound$ 1) - (Bound$ 0)))) + (Tuple$ (&/|list (Bound$ 1) + (App$ (Bound$ 0) + (Bound$ 1)))) ))))) (def Maybe @@ -78,12 +78,12 @@ ;; lux;None Unit ;; lux;Some - (Bound$ 0) + (Bound$ 1) ))))) (def Type (Named$ (&/T "lux" "Type") - (let [Type (App$ (Bound$ 1) (Bound$ 0)) + (let [Type (App$ (Bound$ 0) (Bound$ 1)) TypeList (App$ List Type) TypePair (Tuple$ (&/|list Type Type))] (App$ (Univ$ empty-env @@ -440,8 +440,8 @@ (|case type-fn (&/$UnivQ local-env local-def) (return (beta-reduce (->> local-env - (&/Cons$ type-fn) - (&/Cons$ param)) + (&/Cons$ param) + (&/Cons$ type-fn)) local-def)) (&/$AppT F A) @@ -593,16 +593,16 @@ (with-var (fn [$arg] (|let [expected* (beta-reduce (->> e!env - (&/Cons$ expected) - (&/Cons$ $arg)) + (&/Cons$ $arg) + (&/Cons$ expected)) e!def)] (check* class-loader fixpoints invariant?? expected* actual)))) [_ (&/$ExQ a!env a!def)] (|do [$arg existential] (|let [actual* (beta-reduce (->> a!env - (&/Cons$ expected) - (&/Cons$ $arg)) + (&/Cons$ $arg) + (&/Cons$ expected)) a!def)] (check* class-loader fixpoints invariant?? expected actual*))) |