diff options
author | Eduardo Julian | 2018-05-05 20:42:41 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-05-05 20:42:41 -0400 |
commit | 3c93d7a3aabaa49c67f9a498bc0d70f0af7f09d0 (patch) | |
tree | 33aea74291323d5084ff70797337150b947962a8 /stdlib/source/lux/data | |
parent | 88e2aee41d91deed941acc1ef650ccd3dd0334a2 (diff) |
- Removed Void and Unit as kinds of types.
- Changed the value of "unit" in the old LuxC to match the one in new-luxc.
Diffstat (limited to 'stdlib/source/lux/data')
-rw-r--r-- | stdlib/source/lux/data/format/json.lux | 14 | ||||
-rw-r--r-- | stdlib/source/lux/data/format/xml.lux | 4 | ||||
-rw-r--r-- | stdlib/source/lux/data/text/lexer.lux | 4 | ||||
-rw-r--r-- | stdlib/source/lux/data/text/regex.lux | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux index 7dfb7be5e..c4dd43a1c 100644 --- a/stdlib/source/lux/data/format/json.lux +++ b/stdlib/source/lux/data/format/json.lux @@ -27,7 +27,7 @@ (do-template [<name> <type>] [(type: #export <name> <type>)] - [Null Unit] + [Null Top] [Boolean Bool] [Number Frac] [String Text] @@ -237,7 +237,7 @@ _ (fail ($_ text/compose "JSON value is not " <desc> ".")))))] - [null Unit #Null "null"] + [null Top #Null "null"] [boolean Bool #Boolean "boolean"] [number Frac #Number "number"] [string Text #String "string"] @@ -258,7 +258,7 @@ (def: #export (<check> test) {#.doc (code.text ($_ text/compose "Ensures a JSON value is a " <desc> "."))} - (-> <type> (Reader Unit)) + (-> <type> (Reader Top)) (do p.Monad<Parser> [head any] (case head @@ -398,7 +398,7 @@ (l.some l.space)) (def: data-sep - (l.Lexer [Text Unit Text]) + (l.Lexer [Text Top Text]) ($_ p.seq space~ (l.this ",") space~)) (def: null~ @@ -470,7 +470,7 @@ (wrap chars)))) (def: (kv~ json~) - (-> (-> Unit (l.Lexer JSON)) (l.Lexer [String JSON])) + (-> (-> Top (l.Lexer JSON)) (l.Lexer [String JSON])) (do p.Monad<Parser> [key string~ _ space~ @@ -481,7 +481,7 @@ (do-template [<name> <type> <open> <close> <elem-parser> <prep>] [(def: (<name> json~) - (-> (-> Unit (l.Lexer JSON)) (l.Lexer <type>)) + (-> (-> Top (l.Lexer JSON)) (l.Lexer <type>)) (do p.Monad<Parser> [_ (l.this <open>) _ space~ @@ -495,7 +495,7 @@ ) (def: (json~' _) - (-> Unit (l.Lexer JSON)) + (-> Top (l.Lexer JSON)) ($_ p.alt null~ boolean~ number~ string~ (array~ json~') (object~ json~'))) (struct: #export _ (Codec Text JSON) diff --git a/stdlib/source/lux/data/format/xml.lux b/stdlib/source/lux/data/format/xml.lux index 23b12a42d..d3c6292cd 100644 --- a/stdlib/source/lux/data/format/xml.lux +++ b/stdlib/source/lux/data/format/xml.lux @@ -304,7 +304,7 @@ (#E.Error error))) (def: #export (node tag) - (-> Ident (Reader Unit)) + (-> Ident (Reader Top)) (function (_ docs) (case docs #.Nil @@ -338,7 +338,7 @@ (wrap [tail output])))))) (def: #export ignore - (Reader Unit) + (Reader Top) (function (_ docs) (case docs #.Nil diff --git a/stdlib/source/lux/data/text/lexer.lux b/stdlib/source/lux/data/text/lexer.lux index 338e2b5ac..980926b90 100644 --- a/stdlib/source/lux/data/text/lexer.lux +++ b/stdlib/source/lux/data/text/lexer.lux @@ -63,7 +63,7 @@ (def: #export (this reference) {#.doc "Lex a text if it matches the given sample."} - (-> Text (Lexer Unit)) + (-> Text (Lexer Top)) (function (_ [offset tape]) (case (text.index-of' reference offset tape) (#.Some where) @@ -87,7 +87,7 @@ (def: #export end {#.doc "Ensure the lexer's input is empty."} - (Lexer Unit) + (Lexer Top) (function (_ (^@ input [offset tape])) (if (n/= offset (text.size tape)) (#e.Success [input []]) diff --git a/stdlib/source/lux/data/text/regex.lux b/stdlib/source/lux/data/text/regex.lux index 102f9632f..4bdc6d3c0 100644 --- a/stdlib/source/lux/data/text/regex.lux +++ b/stdlib/source/lux/data/text/regex.lux @@ -309,7 +309,7 @@ )) (def: (unflatten^ lexer) - (-> (l.Lexer Text) (l.Lexer [Text Unit])) + (-> (l.Lexer Text) (l.Lexer [Text Top])) (p.seq lexer (:: p.Monad<Parser> wrap []))) (def: (|||^ left right) |