diff options
author | Eduardo Julian | 2019-04-04 20:40:50 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-04-04 20:40:50 -0400 |
commit | 2914f38f7c3795a63f555409361bc1b317e871a9 (patch) | |
tree | 3ffe997617388f4abfb52558ab48102b9fafc2e6 /stdlib | |
parent | cc16e4ba982a9a2b228c7b40d927f539c9e1a5c8 (diff) |
Forgot "lux text char".
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/data/number/int.lux | 4 | ||||
-rw-r--r-- | stdlib/source/lux/data/number/nat.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/data/number/rev.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/data/text.lux | 4 | ||||
-rw-r--r-- | stdlib/source/lux/tool/compiler/default/syntax.lux | 2 | ||||
-rw-r--r-- | stdlib/source/lux/tool/compiler/name.lux | 2 | ||||
-rw-r--r-- | stdlib/source/test/lux/compiler/default/phase/analysis/procedure/common.lux | 2 |
8 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 412169967..45b190c82 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -5999,7 +5999,7 @@ (case tokens (^multi (^ (list [_ (#Text input)])) (n/= 1 ("lux text size" input))) - (|> ("lux text char" input 0) + (|> input ("lux text char" 0) nat$ list [compiler] #Right) diff --git a/stdlib/source/lux/data/number/int.lux b/stdlib/source/lux/data/number/int.lux index 9a2ce2b9b..f94049296 100644 --- a/stdlib/source/lux/data/number/int.lux +++ b/stdlib/source/lux/data/number/int.lux @@ -73,7 +73,7 @@ (def: (int;sign?? representation) (-> Text (Maybe Int)) - (case ("lux text char" representation 0) + (case ("lux text char" 0 representation) (^ (char "-")) (#.Some -1) @@ -88,7 +88,7 @@ (loop [idx 1 output +0] (if (n/< input-size idx) - (case (<to-value> ("lux text char" repr idx)) + (case (<to-value> ("lux text char" idx repr)) #.None (#error.Failure <error>) diff --git a/stdlib/source/lux/data/number/nat.lux b/stdlib/source/lux/data/number/nat.lux index fb47d2460..c1f0ca420 100644 --- a/stdlib/source/lux/data/number/nat.lux +++ b/stdlib/source/lux/data/number/nat.lux @@ -191,7 +191,7 @@ (loop [idx 0 output 0] (if (n/< input-size idx) - (case (<to-value> ("lux text char" repr idx)) + (case (<to-value> ("lux text char" idx repr)) #.None (#error.Failure ("lux text concat" <error> repr)) diff --git a/stdlib/source/lux/data/number/rev.lux b/stdlib/source/lux/data/number/rev.lux index cb95efff4..bbb34c570 100644 --- a/stdlib/source/lux/data/number/rev.lux +++ b/stdlib/source/lux/data/number/rev.lux @@ -77,7 +77,7 @@ (def: (decode repr) (let [repr-size ("lux text size" repr)] (if (n/> 1 repr-size) - (case ("lux text char" repr 0) + (case ("lux text char" 0 repr) (^ (char ".")) (case (:: <codec> decode (de-prefix repr)) (#error.Success output) diff --git a/stdlib/source/lux/data/text.lux b/stdlib/source/lux/data/text.lux index cf13fd182..384d4e860 100644 --- a/stdlib/source/lux/data/text.lux +++ b/stdlib/source/lux/data/text.lux @@ -46,7 +46,7 @@ (def: #export (nth idx input) (-> Nat Text (Maybe Char)) (if (n/< ("lux text size" input) idx) - (#.Some ("lux text char" input idx)) + (#.Some ("lux text char" idx input)) #.None)) (def: #export (index-of' pattern from input) @@ -215,7 +215,7 @@ (|> hash (i64.left-shift 5) (n/- hash) - (n/+ ("lux text char" input idx)))) + (n/+ ("lux text char" idx input)))) hash))))))) (def: #export concat diff --git a/stdlib/source/lux/tool/compiler/default/syntax.lux b/stdlib/source/lux/tool/compiler/default/syntax.lux index 8be32d7f2..512c19246 100644 --- a/stdlib/source/lux/tool/compiler/default/syntax.lux +++ b/stdlib/source/lux/tool/compiler/default/syntax.lux @@ -155,7 +155,7 @@ (template: (!with-char+ @source-code-size @source-code @offset @char @else @body) (if (!i/< (:coerce Int @source-code-size) (:coerce Int @offset)) - (let [@char ("lux text char" @source-code @offset)] + (let [@char ("lux text char" @offset @source-code)] @body) @else)) diff --git a/stdlib/source/lux/tool/compiler/name.lux b/stdlib/source/lux/tool/compiler/name.lux index f65113d38..d2841d849 100644 --- a/stdlib/source/lux/tool/compiler/name.lux +++ b/stdlib/source/lux/tool/compiler/name.lux @@ -40,7 +40,7 @@ output ""] (if (n/< name/size idx) (recur (inc idx) - (|> ("lux text char" name idx) !sanitize (format output))) + (|> name ("lux text char" idx) !sanitize (format output))) output)))) (def: #export (definition [module short]) diff --git a/stdlib/source/test/lux/compiler/default/phase/analysis/procedure/common.lux b/stdlib/source/test/lux/compiler/default/phase/analysis/procedure/common.lux index a4c4421d2..bf7de5cec 100644 --- a/stdlib/source/test/lux/compiler/default/phase/analysis/procedure/common.lux +++ b/stdlib/source/test/lux/compiler/default/phase/analysis/procedure/common.lux @@ -165,7 +165,7 @@ (test "Can query the size/length of a text." (check-success+ "lux text size" (list subjectC) Nat)) (test "Can obtain the character code of a text at a given index." - (check-success+ "lux text char" (list subjectC fromC) Nat)) + (check-success+ "lux text char" (list fromC subjectC) Nat)) (test "Can clip a piece of text between 2 indices." (check-success+ "lux text clip" (list fromC toC subjectC) Text)) )))) |