aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data
diff options
context:
space:
mode:
authorEduardo Julian2018-05-20 21:04:03 -0400
committerEduardo Julian2018-05-20 21:04:03 -0400
commit14e96f5e5dad439383d63e60a52169cc2e7aaa5c (patch)
tree606398bbf6742a476a2599d9b25c184c71eae5c7 /stdlib/source/lux/data
parent19d38211c33faf6d5fe01665982d696643f60051 (diff)
- Re-named "Top" to "Any", and "Bottom" to "Nothing".
- Removed some modules that should have been deleted before.
Diffstat (limited to 'stdlib/source/lux/data')
-rw-r--r--stdlib/source/lux/data/bit.lux4
-rw-r--r--stdlib/source/lux/data/coll/sequence.lux2
-rw-r--r--stdlib/source/lux/data/format/json.lux14
-rw-r--r--stdlib/source/lux/data/format/xml.lux4
-rw-r--r--stdlib/source/lux/data/number.lux6
-rw-r--r--stdlib/source/lux/data/text/lexer.lux4
-rw-r--r--stdlib/source/lux/data/text/regex.lux2
7 files changed, 18 insertions, 18 deletions
diff --git a/stdlib/source/lux/data/bit.lux b/stdlib/source/lux/data/bit.lux
index e89cf0c9d..a0f8e18a7 100644
--- a/stdlib/source/lux/data/bit.lux
+++ b/stdlib/source/lux/data/bit.lux
@@ -33,7 +33,7 @@
(def: #export (count subject)
{#.doc "Count the number of 1s in a bit-map."}
- (-> (I64 Top) Nat)
+ (-> (I64 Any) Nat)
(let [count' (n/- (|> subject (right-shift +1) (and +6148914691236517205) i64)
(i64 subject))]
(|> count'
@@ -69,7 +69,7 @@
)
(def: #export (set? idx input)
- (-> Nat (I64 Top) Bool)
+ (-> Nat (I64 Any) Bool)
(|> input (:! I64) (..and (flag idx)) (n/= +0) .not))
(do-template [<name> <main> <comp>]
diff --git a/stdlib/source/lux/data/coll/sequence.lux b/stdlib/source/lux/data/coll/sequence.lux
index f5ade6bed..4e6226dcd 100644
--- a/stdlib/source/lux/data/coll/sequence.lux
+++ b/stdlib/source/lux/data/coll/sequence.lux
@@ -59,7 +59,7 @@
(bit.and branch-idx-mask))
(def: (new-hierarchy _)
- (All [a] (-> Top (Hierarchy a)))
+ (All [a] (-> Any (Hierarchy a)))
(array.new full-node-size))
(def: (tail-off vec-size)
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux
index 03d4de615..9262c3d70 100644
--- a/stdlib/source/lux/data/format/json.lux
+++ b/stdlib/source/lux/data/format/json.lux
@@ -24,7 +24,7 @@
(do-template [<name> <type>]
[(type: #export <name> <type>)]
- [Null Top]
+ [Null Any]
[Boolean Bool]
[Number Frac]
[String Text]
@@ -234,7 +234,7 @@
_
(fail ($_ text/compose "JSON value is not " <desc> ".")))))]
- [null Top #Null "null"]
+ [null Any #Null "null"]
[boolean Bool #Boolean "boolean"]
[number Frac #Number "number"]
[string Text #String "string"]
@@ -255,7 +255,7 @@
(def: #export (<check> test)
{#.doc (code.text ($_ text/compose "Ensures a JSON value is a " <desc> "."))}
- (-> <type> (Reader Top))
+ (-> <type> (Reader Any))
(do p.Monad<Parser>
[head any]
(case head
@@ -395,7 +395,7 @@
(l.some l.space))
(def: data-sep
- (l.Lexer [Text Top Text])
+ (l.Lexer [Text Any Text])
($_ p.seq space~ (l.this ",") space~))
(def: null~
@@ -467,7 +467,7 @@
(wrap chars))))
(def: (kv~ json~)
- (-> (-> Top (l.Lexer JSON)) (l.Lexer [String JSON]))
+ (-> (-> Any (l.Lexer JSON)) (l.Lexer [String JSON]))
(do p.Monad<Parser>
[key string~
_ space~
@@ -478,7 +478,7 @@
(do-template [<name> <type> <open> <close> <elem-parser> <prep>]
[(def: (<name> json~)
- (-> (-> Top (l.Lexer JSON)) (l.Lexer <type>))
+ (-> (-> Any (l.Lexer JSON)) (l.Lexer <type>))
(do p.Monad<Parser>
[_ (l.this <open>)
_ space~
@@ -492,7 +492,7 @@
)
(def: (json~' _)
- (-> Top (l.Lexer JSON))
+ (-> Any (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 d1a84d675..a725263af 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 Top))
+ (-> Ident (Reader Any))
(function (_ docs)
(case docs
#.Nil
@@ -338,7 +338,7 @@
(wrap [tail output]))))))
(def: #export ignore
- (Reader Top)
+ (Reader Any)
(function (_ docs)
(case docs
#.Nil
diff --git a/stdlib/source/lux/data/number.lux b/stdlib/source/lux/data/number.lux
index 2aba0da7a..72c6dbb86 100644
--- a/stdlib/source/lux/data/number.lux
+++ b/stdlib/source/lux/data/number.lux
@@ -731,7 +731,7 @@
(type: Digits (Array Nat))
(def: (make-digits _)
- (-> Top Digits)
+ (-> Any Digits)
("lux array new" bit.width))
(def: (digits-get idx digits)
@@ -955,7 +955,7 @@
(do-template [<getter> <mask> <size> <offset>]
[(def: <mask> (|> +1 (bit.left-shift <size>) dec (bit.left-shift <offset>)))
(def: (<getter> input)
- (-> (I64 Top) I64)
+ (-> (I64 Any) I64)
(|> input (bit.and <mask>) (bit.logical-right-shift <offset>) i64))]
[mantissa mantissa-mask mantissa-size +0]
@@ -964,7 +964,7 @@
)
(def: #export (bits-to-frac input)
- (-> (I64 Top) Frac)
+ (-> (I64 Any) Frac)
(let [S (sign input)
E (exponent input)
M (mantissa input)]
diff --git a/stdlib/source/lux/data/text/lexer.lux b/stdlib/source/lux/data/text/lexer.lux
index d965020e0..84495a6a8 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 Top))
+ (-> Text (Lexer Any))
(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 Top)
+ (Lexer Any)
(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 f644c4669..cf0d69475 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 Top]))
+ (-> (l.Lexer Text) (l.Lexer [Text Any]))
(p.seq lexer (:: p.Monad<Parser> wrap [])))
(def: (|||^ left right)