diff options
author | Eduardo Julian | 2018-07-04 21:34:07 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-04 21:34:07 -0400 |
commit | 4bc58162f3d381abf33c936eafc976a2f422258c (patch) | |
tree | f975876db8c07f2c2dc788a7d0ee02c891f1c167 /stdlib/source/lux/lang | |
parent | 7585d987ad3898859ce817ad9857dccb6e788c6b (diff) |
- Re-named Bound to Paremeter.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/lang/compiler/analysis/inference.lux | 16 | ||||
-rw-r--r-- | stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux | 8 | ||||
-rw-r--r-- | stdlib/source/lux/lang/type.lux | 8 | ||||
-rw-r--r-- | stdlib/source/lux/lang/type/check.lux | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/stdlib/source/lux/lang/compiler/analysis/inference.lux b/stdlib/source/lux/lang/compiler/analysis/inference.lux index 5e3fb0cfe..42ab27a6c 100644 --- a/stdlib/source/lux/lang/compiler/analysis/inference.lux +++ b/stdlib/source/lux/lang/compiler/analysis/inference.lux @@ -43,30 +43,30 @@ [invalid-type-application] ) -(def: (replace bound-idx replacement type) +(def: (replace parameter-idx replacement type) (-> Nat Type Type Type) (case type (#.Primitive name params) - (#.Primitive name (list/map (replace bound-idx replacement) params)) + (#.Primitive name (list/map (replace parameter-idx replacement) params)) (^template [<tag>] (<tag> left right) - (<tag> (replace bound-idx replacement left) - (replace bound-idx replacement right))) + (<tag> (replace parameter-idx replacement left) + (replace parameter-idx replacement right))) ([#.Sum] [#.Product] [#.Function] [#.Apply]) - (#.Bound idx) - (if (n/= bound-idx idx) + (#.Parameter idx) + (if (n/= parameter-idx idx) replacement type) (^template [<tag>] (<tag> env quantified) - (<tag> (list/map (replace bound-idx replacement) env) - (replace (n/+ +2 bound-idx) replacement quantified))) + (<tag> (list/map (replace parameter-idx replacement) env) + (replace (n/+ +2 parameter-idx) replacement quantified))) ([#.UnivQ] [#.ExQ]) diff --git a/stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux b/stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux index 2de55b223..9b742b415 100644 --- a/stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux +++ b/stdlib/source/lux/lang/compiler/extension/analysis/host.jvm.lux @@ -597,7 +597,7 @@ arity (|> (list.n/range +0 (dec arity)) list.reverse - (list/map (|>> (n/* +2) inc #.Bound)) + (list/map (|>> (n/* +2) inc #.Parameter)) (#.Primitive class-name) (type.univ-q arity))))) @@ -959,16 +959,16 @@ true (list.zip2 arg-classes parameters)))))) -(def: idx-to-bound +(def: idx-to-parameter (-> Nat Type) - (|>> (n/* +2) inc #.Bound)) + (|>> (n/* +2) inc #.Parameter)) (def: (type-vars amount offset) (-> Nat Nat (List Type)) (if (n/= +0 amount) (list) (|> (list.n/range offset (|> amount dec (n/+ offset))) - (list/map idx-to-bound)))) + (list/map idx-to-parameter)))) (def: (method-to-type method-style method) (-> Method-style Method (Meta [Type (List Type)])) diff --git a/stdlib/source/lux/lang/type.lux b/stdlib/source/lux/lang/type.lux index acc3d9046..cd18e103d 100644 --- a/stdlib/source/lux/lang/type.lux +++ b/stdlib/source/lux/lang/type.lux @@ -37,7 +37,7 @@ ([#.UnivQ] [#.ExQ]) - (#.Bound idx) + (#.Parameter idx) (maybe.default (error! (text/compose "Unknown type var: " (nat/encode idx))) (list.nth idx env)) @@ -59,7 +59,7 @@ (^template [<tag>] [(<tag> xid) (<tag> yid)] (n/= yid xid)) - ([#.Var] [#.Ex] [#.Bound]) + ([#.Var] [#.Ex] [#.Parameter]) (^or [(#.Function xleft xright) (#.Function yleft yright)] [(#.Apply xleft xright) (#.Apply yleft yright)]) @@ -172,7 +172,7 @@ (^template [<tag>] (<tag> idx) (` (<tag> (~ (code.nat idx))))) - ([#.Var] [#.Ex] [#.Bound]) + ([#.Var] [#.Ex] [#.Parameter]) (^template [<tag>] (<tag> left right) @@ -223,7 +223,7 @@ (list/fold text/compose "")) " " (to-text out) ")")) - (#.Bound idx) + (#.Parameter idx) (nat/encode idx) (#.Var id) diff --git a/stdlib/source/lux/lang/type/check.lux b/stdlib/source/lux/lang/type/check.lux index 2e255d47c..482ea66bf 100644 --- a/stdlib/source/lux/lang/type/check.lux +++ b/stdlib/source/lux/lang/type/check.lux @@ -651,7 +651,7 @@ [paramsT+' (monad.map @ clean paramsT+)] (wrap (#.Primitive name paramsT+'))) - (^or (#.Bound _) (#.Ex _) (#.Named _)) + (^or (#.Parameter _) (#.Ex _) (#.Named _)) (:: Monad<Check> wrap inputT) (^template [<tag>] |