From eb201f6e669f802650fdf06ea1acb1ef5682297b Mon Sep 17 00:00:00 2001
From: Eduardo Julian
Date: Tue, 10 Jul 2018 00:24:01 -0400
Subject: - Re-named "struct:" to "structure:".
---
stdlib/source/lux.lux | 8 ++---
stdlib/source/lux/concurrency/frp.lux | 6 ++--
stdlib/source/lux/concurrency/promise.lux | 6 ++--
stdlib/source/lux/concurrency/stm.lux | 6 ++--
stdlib/source/lux/concurrency/task.lux | 6 ++--
stdlib/source/lux/control/apply.lux | 2 +-
stdlib/source/lux/control/codec.lux | 2 +-
stdlib/source/lux/control/continuation.lux | 6 ++--
stdlib/source/lux/control/functor.lux | 2 +-
stdlib/source/lux/control/interval.lux | 2 +-
stdlib/source/lux/control/monad/free.lux | 6 ++--
stdlib/source/lux/control/parser.lux | 6 ++--
stdlib/source/lux/control/predicate.lux | 2 +-
stdlib/source/lux/control/reader.lux | 8 ++---
stdlib/source/lux/control/region.lux | 6 ++--
stdlib/source/lux/control/state.lux | 12 +++----
stdlib/source/lux/control/thread.lux | 6 ++--
stdlib/source/lux/control/writer.lux | 8 ++---
stdlib/source/lux/data/bool.lux | 8 ++---
stdlib/source/lux/data/coll/array.lux | 8 ++---
stdlib/source/lux/data/coll/bits.lux | 2 +-
stdlib/source/lux/data/coll/dictionary/ordered.lux | 2 +-
.../source/lux/data/coll/dictionary/unordered.lux | 2 +-
stdlib/source/lux/data/coll/list.lux | 14 ++++----
stdlib/source/lux/data/coll/queue.lux | 4 +--
stdlib/source/lux/data/coll/row.lux | 18 +++++-----
stdlib/source/lux/data/coll/sequence.lux | 4 +--
stdlib/source/lux/data/coll/set/ordered.lux | 2 +-
stdlib/source/lux/data/coll/set/unordered.lux | 4 +--
stdlib/source/lux/data/coll/tree/rose.lux | 6 ++--
stdlib/source/lux/data/coll/tree/rose/zipper.lux | 4 +--
stdlib/source/lux/data/color.lux | 2 +-
stdlib/source/lux/data/env.lux | 4 +--
stdlib/source/lux/data/error.lux | 8 ++---
stdlib/source/lux/data/format/json.lux | 4 +--
stdlib/source/lux/data/format/xml.lux | 4 +--
stdlib/source/lux/data/ident.lux | 6 ++--
stdlib/source/lux/data/identity.lux | 8 ++---
stdlib/source/lux/data/lazy.lux | 6 ++--
stdlib/source/lux/data/maybe.lux | 12 +++----
stdlib/source/lux/data/number.lux | 38 +++++++++++-----------
stdlib/source/lux/data/number/complex.lux | 4 +--
stdlib/source/lux/data/number/ratio.lux | 8 ++---
stdlib/source/lux/data/store.lux | 4 +--
stdlib/source/lux/data/text.lux | 8 ++---
stdlib/source/lux/data/text/unicode.lux | 2 +-
stdlib/source/lux/data/trace.lux | 4 +--
stdlib/source/lux/function.lux | 2 +-
stdlib/source/lux/io.lux | 12 +++----
.../lux/lang/compiler/analysis/case/coverage.lux | 2 +-
stdlib/source/lux/lang/compiler/meta/archive.lux | 2 +-
stdlib/source/lux/lang/reference.lux | 4 +--
stdlib/source/lux/lang/type.lux | 2 +-
stdlib/source/lux/lang/type/check.lux | 6 ++--
stdlib/source/lux/macro.lux | 6 ++--
stdlib/source/lux/macro/code.lux | 2 +-
stdlib/source/lux/macro/poly/json.lux | 6 ++--
stdlib/source/lux/math/modular.lux | 2 +-
stdlib/source/lux/math/random.lux | 6 ++--
stdlib/source/lux/time/date.lux | 18 +++++-----
stdlib/source/lux/time/duration.lux | 8 ++---
stdlib/source/lux/time/instant.lux | 8 ++---
stdlib/source/lux/type/object/interface.lux | 2 +-
stdlib/source/lux/type/resource.lux | 2 +-
stdlib/source/lux/type/unit.lux | 8 ++---
stdlib/source/lux/world/blob.jvm.lux | 2 +-
stdlib/source/lux/world/file.lux | 2 +-
stdlib/test/test/lux/data/format/json.lux | 2 +-
68 files changed, 202 insertions(+), 202 deletions(-)
(limited to 'stdlib')
diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux
index bbf765e9a..238d77bd8 100644
--- a/stdlib/source/lux.lux
+++ b/stdlib/source/lux.lux
@@ -3844,7 +3844,7 @@
(#Left "Not expecting any type.")))))
(macro: #export (struct tokens)
- {#.doc "Not meant to be used directly. Prefer \"struct:\"."}
+ {#.doc "Not meant to be used directly. Prefer \"structure:\"."}
(do Monad
[tokens' (monad/map Monad macro-expand tokens)
struct-type get-expected-type
@@ -3880,9 +3880,9 @@
(-> (List Text) Text)
(|> parts list/reverse (list/fold text/compose "")))
-(macro: #export (struct: tokens)
+(macro: #export (structure: tokens)
{#.doc "## Definition of structures ala ML.
- (struct: #export Ord (Ord Int)
+ (structure: #export Ord (Ord Int)
(def: eq Equivalence)
(def: (< test subject)
(lux.< test subject))
@@ -3956,7 +3956,7 @@
(fail "Cannot infer name, so struct must have a name other than \"_\"!"))
#None
- (fail "Wrong syntax for struct:"))))
+ (fail "Wrong syntax for structure:"))))
(def: #export (id x)
{#.doc "Identity function.
diff --git a/stdlib/source/lux/concurrency/frp.lux b/stdlib/source/lux/concurrency/frp.lux
index 7b4bfbec0..dda469f62 100644
--- a/stdlib/source/lux/concurrency/frp.lux
+++ b/stdlib/source/lux/concurrency/frp.lux
@@ -96,14 +96,14 @@
output)))
## [Structures]
-(struct: #export _ (Functor Channel)
+(structure: #export _ (Functor Channel)
(def: (map f input)
(let [output (channel [])]
(exec (io.run (listen (|>> f (publish output))
input))
output))))
-(struct: #export _ (Apply Channel)
+(structure: #export _ (Apply Channel)
(def: functor Functor)
(def: (apply ff fa)
@@ -114,7 +114,7 @@
ff))
output))))
-(struct: #export _ (Monad Channel)
+(structure: #export _ (Monad Channel)
(def: functor Functor)
(def: (wrap a)
diff --git a/stdlib/source/lux/concurrency/promise.lux b/stdlib/source/lux/concurrency/promise.lux
index 866cdd8da..b2597c2cc 100644
--- a/stdlib/source/lux/concurrency/promise.lux
+++ b/stdlib/source/lux/concurrency/promise.lux
@@ -72,14 +72,14 @@
(#.Some _)
true))
-(struct: #export _ (Functor Promise)
+(structure: #export _ (Functor Promise)
(def: (map f fa)
(let [fb (promise #.None)]
(exec (await (function (_ a) (resolve (f a) fb))
fa)
fb))))
-(struct: #export _ (Apply Promise)
+(structure: #export _ (Apply Promise)
(def: functor Functor)
(def: (apply ff fa)
@@ -90,7 +90,7 @@
ff)
fb))))
-(struct: #export _ (Monad Promise)
+(structure: #export _ (Monad Promise)
(def: functor Functor)
(def: (wrap a)
diff --git a/stdlib/source/lux/concurrency/stm.lux b/stdlib/source/lux/concurrency/stm.lux
index 9fef9f59e..eddaabf2b 100644
--- a/stdlib/source/lux/concurrency/stm.lux
+++ b/stdlib/source/lux/concurrency/stm.lux
@@ -127,13 +127,13 @@
[(#.Cons [var (read!! var) value] tx)
[]])))
-(struct: #export _ (Functor STM)
+(structure: #export _ (Functor STM)
(def: (map f fa)
(function (_ tx)
(let [[tx' a] (fa tx)]
[tx' (f a)]))))
-(struct: #export _ (Apply STM)
+(structure: #export _ (Apply STM)
(def: functor Functor)
(def: (apply ff fa)
@@ -142,7 +142,7 @@
[tx'' a] (fa tx')]
[tx'' (f a)]))))
-(struct: #export _ (Monad STM)
+(structure: #export _ (Monad STM)
(def: functor Functor)
(def: (wrap a)
diff --git a/stdlib/source/lux/concurrency/task.lux b/stdlib/source/lux/concurrency/task.lux
index 911fdd2d2..d51574bbc 100644
--- a/stdlib/source/lux/concurrency/task.lux
+++ b/stdlib/source/lux/concurrency/task.lux
@@ -30,7 +30,7 @@
(All [a] (-> (Task a) (Task (E.Error a))))
(:: P.Functor map (|>> #E.Success) computation))
-(struct: #export _ (F.Functor Task)
+(structure: #export _ (F.Functor Task)
(def: (map f fa)
(:: P.Functor map
(function (_ fa')
@@ -42,7 +42,7 @@
(#E.Success (f a))))
fa)))
-(struct: #export _ (A.Apply Task)
+(structure: #export _ (A.Apply Task)
(def: functor Functor)
(def: (apply ff fa)
@@ -54,7 +54,7 @@
a fa']
(wrap (f a)))))))
-(struct: #export _ (Monad Task)
+(structure: #export _ (Monad Task)
(def: functor Functor)
(def: wrap return)
diff --git a/stdlib/source/lux/control/apply.lux b/stdlib/source/lux/control/apply.lux
index 4c3d73ba1..2dd932140 100644
--- a/stdlib/source/lux/control/apply.lux
+++ b/stdlib/source/lux/control/apply.lux
@@ -11,7 +11,7 @@
(-> (f (-> a b)) (f a) (f b)))
apply))
-(struct: #export (compose Monad Apply Apply)
+(structure: #export (compose Monad Apply Apply)
{#.doc "Applicative functor composition."}
(All [F G]
(-> (Monad F) (Apply F) (Apply G)
diff --git a/stdlib/source/lux/control/codec.lux b/stdlib/source/lux/control/codec.lux
index 1c0375831..b219c8522 100644
--- a/stdlib/source/lux/control/codec.lux
+++ b/stdlib/source/lux/control/codec.lux
@@ -12,7 +12,7 @@
decode))
## [Values]
-(struct: #export (compose Codec Codec)
+(structure: #export (compose Codec Codec)
{#.doc "Codec composition."}
(All [a b c]
(-> (Codec c b) (Codec b a)
diff --git a/stdlib/source/lux/control/continuation.lux b/stdlib/source/lux/control/continuation.lux
index d23ebec18..0cb7b5c7e 100644
--- a/stdlib/source/lux/control/continuation.lux
+++ b/stdlib/source/lux/control/continuation.lux
@@ -22,11 +22,11 @@
(All [a] (-> (Cont a a) a))
(cont id))
-(struct: #export Functor (All [o] (Functor (All [i] (Cont i o))))
+(structure: #export Functor (All [o] (Functor (All [i] (Cont i o))))
(def: (map f fv)
(function (_ k) (fv (compose k f)))))
-(struct: #export Apply (All [o] (Apply (All [i] (Cont i o))))
+(structure: #export Apply (All [o] (Apply (All [i] (Cont i o))))
(def: functor Functor)
(def: (apply ff fv)
@@ -35,7 +35,7 @@
(function (_ v)) fv
(function (_ f)) ff))))
-(struct: #export Monad (All [o] (Monad (All [i] (Cont i o))))
+(structure: #export Monad (All [o] (Monad (All [i] (Cont i o))))
(def: functor Functor)
(def: (wrap value)
diff --git a/stdlib/source/lux/control/functor.lux b/stdlib/source/lux/control/functor.lux
index c4478a710..8fcb40c55 100644
--- a/stdlib/source/lux/control/functor.lux
+++ b/stdlib/source/lux/control/functor.lux
@@ -18,7 +18,7 @@
(type: #export (<$> f g)
(All [a] (f (g a))))
-(struct: #export (compose Functor Functor)
+(structure: #export (compose Functor Functor)
{#.doc "Functor composition."}
(All [F G] (-> (Functor F) (Functor G) (Functor (All [a] (F (G a))))))
(def: (map f fga)
diff --git a/stdlib/source/lux/control/interval.lux b/stdlib/source/lux/control/interval.lux
index a53115576..1cc825070 100644
--- a/stdlib/source/lux/control/interval.lux
+++ b/stdlib/source/lux/control/interval.lux
@@ -133,7 +133,7 @@
[after? >]
)
-(struct: #export Equivalence (All [a] (Equivalence (Interval a)))
+(structure: #export Equivalence (All [a] (Equivalence (Interval a)))
(def: (= reference sample)
(let [(^open) reference]
(and (= bottom (:: sample bottom))
diff --git a/stdlib/source/lux/control/monad/free.lux b/stdlib/source/lux/control/monad/free.lux
index 716ae805b..400c5fc31 100644
--- a/stdlib/source/lux/control/monad/free.lux
+++ b/stdlib/source/lux/control/monad/free.lux
@@ -9,7 +9,7 @@
(#Pure a)
(#Effect (F (Free F a))))
-(struct: #export (Functor dsl)
+(structure: #export (Functor dsl)
(All [F] (-> (Functor F) (Functor (Free F))))
(def: (map f ea)
@@ -20,7 +20,7 @@
(#Effect value)
(#Effect (:: dsl map (map f) value)))))
-(struct: #export (Apply dsl)
+(structure: #export (Apply dsl)
(All [F] (-> (Functor F) (Apply (Free F))))
(def: functor (Functor dsl))
@@ -41,7 +41,7 @@
ff))
)))
-(struct: #export (Monad dsl)
+(structure: #export (Monad dsl)
(All [F] (-> (Functor F) (Monad (Free F))))
(def: functor (Functor dsl))
diff --git a/stdlib/source/lux/control/parser.lux b/stdlib/source/lux/control/parser.lux
index 91c3a84a8..1ad76a50a 100644
--- a/stdlib/source/lux/control/parser.lux
+++ b/stdlib/source/lux/control/parser.lux
@@ -13,7 +13,7 @@
(-> s (e.Error [s a])))
## [Structures]
-(struct: #export Functor (All [s] (Functor (Parser s)))
+(structure: #export Functor (All [s] (Functor (Parser s)))
(def: (map f ma)
(function (_ input)
(case (ma input)
@@ -23,7 +23,7 @@
(#e.Success [input' a])
(#e.Success [input' (f a)])))))
-(struct: #export Apply (All [s] (Apply (Parser s)))
+(structure: #export Apply (All [s] (Apply (Parser s)))
(def: functor Functor)
(def: (apply ff fa)
@@ -40,7 +40,7 @@
(#e.Error msg)
(#e.Error msg)))))
-(struct: #export Monad (All [s] (Monad (Parser s)))
+(structure: #export Monad (All [s] (Monad (Parser s)))
(def: functor Functor)
(def: (wrap x)
diff --git a/stdlib/source/lux/control/predicate.lux b/stdlib/source/lux/control/predicate.lux
index 44e273dee..56c048593 100644
--- a/stdlib/source/lux/control/predicate.lux
+++ b/stdlib/source/lux/control/predicate.lux
@@ -23,7 +23,7 @@
)
(do-template [ ]
- [(struct: #export (All [a] (Monoid (Predicate a)))
+ [(structure: #export (All [a] (Monoid (Predicate a)))
(def: identity )
(def: compose ))]
diff --git a/stdlib/source/lux/control/reader.lux b/stdlib/source/lux/control/reader.lux
index 228e474db..274c5b1cc 100644
--- a/stdlib/source/lux/control/reader.lux
+++ b/stdlib/source/lux/control/reader.lux
@@ -10,14 +10,14 @@
(-> r a))
## [Structures]
-(struct: #export Functor
+(structure: #export Functor
(All [r] (F.Functor (Reader r)))
(def: (map f fa)
(function (_ env)
(f (fa env)))))
-(struct: #export Apply
+(structure: #export Apply
(All [r] (A.Apply (Reader r)))
(def: functor Functor)
@@ -26,7 +26,7 @@
(function (_ env)
((ff env) (fa env)))))
-(struct: #export Monad
+(structure: #export Monad
(All [r] (Monad (Reader r)))
(def: functor Functor)
@@ -53,7 +53,7 @@
(All [r a] (-> r (Reader r a) a))
(proc env))
-(struct: #export (ReaderT Monad)
+(structure: #export (ReaderT Monad)
{#.doc "Monad transformer for Reader."}
(All [M] (-> (Monad M) (All [e] (Monad (All [a] (Reader e (M a)))))))
diff --git a/stdlib/source/lux/control/region.lux b/stdlib/source/lux/control/region.lux
index 7397d9781..d35495d93 100644
--- a/stdlib/source/lux/control/region.lux
+++ b/stdlib/source/lux/control/region.lux
@@ -62,7 +62,7 @@
cleaners)
(#e.Success value)])))
-(struct: #export (Functor Functor)
+(structure: #export (Functor Functor)
(All [m]
(-> (Functor m)
(All [r] (Functor (Region r m)))))
@@ -80,7 +80,7 @@
(#e.Error error))])
(fa region+cleaners))))))
-(struct: #export (Apply Monad)
+(structure: #export (Apply Monad)
(All [m]
(-> (Monad m)
(All [r] (Apply (Region r m)))))
@@ -101,7 +101,7 @@
[_ (#e.Error error)])
(wrap [cleaners (#e.Error error)]))))))
-(struct: #export (Monad Monad)
+(structure: #export (Monad Monad)
(All [m]
(-> (Monad m)
(All [r] (Monad (Region r m)))))
diff --git a/stdlib/source/lux/control/state.lux b/stdlib/source/lux/control/state.lux
index be8844a0c..244052f2d 100644
--- a/stdlib/source/lux/control/state.lux
+++ b/stdlib/source/lux/control/state.lux
@@ -10,7 +10,7 @@
(-> s [s a]))
## [Structures]
-(struct: #export Functor
+(structure: #export Functor
(All [s] (F.Functor (State s)))
(def: (map f ma)
@@ -18,7 +18,7 @@
(let [[state' a] (ma state)]
[state' (f a)]))))
-(struct: #export Apply
+(structure: #export Apply
(All [s] (A.Apply (State s)))
(def: functor Functor)
@@ -29,7 +29,7 @@
[state'' a] (fa state')]
[state'' (f a)]))))
-(struct: #export Monad
+(structure: #export Monad
(All [s] (Monad (State s)))
(def: functor Functor)
@@ -80,7 +80,7 @@
(All [s a] (-> s (State s a) [s a]))
(action state))
-(struct: (Functor Functor)
+(structure: (Functor Functor)
(All [M s] (-> (F.Functor M) (F.Functor (All [a] (-> s (M [s a]))))))
(def: (map f sfa)
@@ -88,7 +88,7 @@
(:: Functor map (function (_ [s a]) [s (f a)])
(sfa state)))))
-(struct: (Apply Monad)
+(structure: (Apply Monad)
(All [M s] (-> (Monad M) (A.Apply (All [a] (-> s (M [s a]))))))
(def: functor (Functor (:: Monad functor)))
@@ -109,7 +109,7 @@
(All [M s a] (-> s (State' M s a) (M [s a])))
(action state))
-(struct: #export (Monad Monad)
+(structure: #export (Monad Monad)
{#.doc "A monad transformer to create composite stateful computations."}
(All [M s] (-> (Monad M) (Monad (State' M s))))
diff --git a/stdlib/source/lux/control/thread.lux b/stdlib/source/lux/control/thread.lux
index 5709b41bb..b54de05ef 100644
--- a/stdlib/source/lux/control/thread.lux
+++ b/stdlib/source/lux/control/thread.lux
@@ -33,7 +33,7 @@
a))
(thread []))
-(struct: #export Functor
+(structure: #export Functor
(All [!] (Functor (Thread !)))
(def: (map f)
@@ -41,7 +41,7 @@
(function (_ !)
(f (fa !))))))
-(struct: #export Apply
+(structure: #export Apply
(All [!] (Apply (Thread !)))
(def: functor Functor)
@@ -50,7 +50,7 @@
(function (_ !)
((ff !) (fa !)))))
-(struct: #export Monad
+(structure: #export Monad
(All [!] (Monad (Thread !)))
(def: functor Functor)
diff --git a/stdlib/source/lux/control/writer.lux b/stdlib/source/lux/control/writer.lux
index 3dcf64cc3..33b0df8a9 100644
--- a/stdlib/source/lux/control/writer.lux
+++ b/stdlib/source/lux/control/writer.lux
@@ -10,7 +10,7 @@
{#log l
#value a})
-(struct: #export Functor
+(structure: #export Functor
(All [l]
(F.Functor (Writer l)))
@@ -18,7 +18,7 @@
(let [[log datum] fa]
[log (f datum)])))
-(struct: #export (Apply mon)
+(structure: #export (Apply mon)
(All [l]
(-> (Monoid l) (A.Apply (Writer l))))
@@ -29,7 +29,7 @@
[log2 a] fa]
[(:: mon compose log1 log2) (f a)])))
-(struct: #export (Monad mon)
+(structure: #export (Monad mon)
(All [l]
(-> (Monoid l) (Monad (Writer l))))
@@ -47,7 +47,7 @@
(All [l] (-> l (Writer l Any)))
[l []])
-(struct: #export (WriterT Monoid Monad)
+(structure: #export (WriterT Monoid Monad)
(All [l M] (-> (Monoid l) (Monad M) (Monad (All [a] (M (Writer l a))))))
(def: functor (F.compose (get@ #monad.functor Monad) Functor))
diff --git a/stdlib/source/lux/data/bool.lux b/stdlib/source/lux/data/bool.lux
index 88c1011e5..eee9de319 100644
--- a/stdlib/source/lux/data/bool.lux
+++ b/stdlib/source/lux/data/bool.lux
@@ -7,13 +7,13 @@
function))
## [Structures]
-(struct: #export _ (Equivalence Bool)
+(structure: #export _ (Equivalence Bool)
(def: (= x y)
(if x
y
(not y))))
-(struct: #export _ (Hash Bool)
+(structure: #export _ (Hash Bool)
(def: eq Equivalence)
(def: (hash value)
(case value
@@ -21,7 +21,7 @@
false +0)))
(do-template [ ]
- [(struct: #export (Monoid Bool)
+ [(structure: #export (Monoid Bool)
(def: identity )
(def: (compose x y)
( x y)))]
@@ -30,7 +30,7 @@
[And@Monoid true and]
)
-(struct: #export _ (Codec Text Bool)
+(structure: #export _ (Codec Text Bool)
(def: (encode x)
(if x
"true"
diff --git a/stdlib/source/lux/data/coll/array.lux b/stdlib/source/lux/data/coll/array.lux
index 8f3bee0c3..842acec39 100644
--- a/stdlib/source/lux/data/coll/array.lux
+++ b/stdlib/source/lux/data/coll/array.lux
@@ -149,7 +149,7 @@
#.None
output)))))
-(struct: #export (Equivalence Equivalence)
+(structure: #export (Equivalence Equivalence)
(All [a] (-> (Equivalence a) (Equivalence (Array a))))
(def: (= xs ys)
(let [sxs (size xs)
@@ -170,7 +170,7 @@
(list.n/range +0 (dec sxs)))))
))
-(struct: #export Monoid (All [a] (Monoid (Array a)))
+(structure: #export Monoid (All [a] (Monoid (Array a)))
(def: identity (new +0))
(def: (compose xs ys)
@@ -180,7 +180,7 @@
(copy sxs +0 xs +0)
(copy sxy +0 ys sxs)))))
-(struct: #export _ (Functor Array)
+(structure: #export _ (Functor Array)
(def: (map f ma)
(let [arr-size (size ma)]
(if (n/= +0 arr-size)
@@ -196,7 +196,7 @@
(list.n/range +0 (dec arr-size)))
))))
-(struct: #export _ (Fold Array)
+(structure: #export _ (Fold Array)
(def: (fold f init xs)
(let [arr-size (size xs)]
(loop [so-far init
diff --git a/stdlib/source/lux/data/coll/bits.lux b/stdlib/source/lux/data/coll/bits.lux
index 94d3398a0..426f830d2 100644
--- a/stdlib/source/lux/data/coll/bits.lux
+++ b/stdlib/source/lux/data/coll/bits.lux
@@ -151,7 +151,7 @@
[xor bit.xor]
)
-(struct: #export _ (Equivalence Bits)
+(structure: #export _ (Equivalence Bits)
(def: (= reference sample)
(let [size (n/max (array.size reference)
(array.size sample))]
diff --git a/stdlib/source/lux/data/coll/dictionary/ordered.lux b/stdlib/source/lux/data/coll/dictionary/ordered.lux
index 6fbcb5a42..5c616fa0b 100644
--- a/stdlib/source/lux/data/coll/dictionary/ordered.lux
+++ b/stdlib/source/lux/data/coll/dictionary/ordered.lux
@@ -551,7 +551,7 @@
[values v (get@ #value node')]
)
-(struct: #export (Equivalence Equivalence) (All [k v] (-> (Equivalence v) (Equivalence (Dict k v))))
+(structure: #export (Equivalence Equivalence) (All [k v] (-> (Equivalence v) (Equivalence (Dict k v))))
(def: (= reference sample)
(let [Equivalence (:: sample eq)]
(loop [entriesR (entries reference)
diff --git a/stdlib/source/lux/data/coll/dictionary/unordered.lux b/stdlib/source/lux/data/coll/dictionary/unordered.lux
index bb6d12b24..61d21b425 100644
--- a/stdlib/source/lux/data/coll/dictionary/unordered.lux
+++ b/stdlib/source/lux/data/coll/dictionary/unordered.lux
@@ -671,7 +671,7 @@
keys)))
## [Structures]
-(struct: #export (Equivalence Equivalence) (All [k v] (-> (Equivalence v) (Equivalence (Dict k v))))
+(structure: #export (Equivalence Equivalence) (All [k v] (-> (Equivalence v) (Equivalence (Dict k v))))
(def: (= test subject)
(and (n/= (size test)
(size subject))
diff --git a/stdlib/source/lux/data/coll/list.lux b/stdlib/source/lux/data/coll/list.lux
index 4049fce8e..74ef2e5cc 100644
--- a/stdlib/source/lux/data/coll/list.lux
+++ b/stdlib/source/lux/data/coll/list.lux
@@ -16,7 +16,7 @@
## (#Cons a (List a)))
## [Functions]
-(struct: #export _ (fold.Fold List)
+(structure: #export _ (fold.Fold List)
(def: (fold f init xs)
(case xs
#.Nil
@@ -265,7 +265,7 @@
(nth (dec i) xs'))))
## [Structures]
-(struct: #export (Equivalence Equivalence)
+(structure: #export (Equivalence Equivalence)
(All [a] (-> (Equivalence a) (Equivalence (List a))))
(def: (= xs ys)
(case [xs ys]
@@ -280,7 +280,7 @@
false
)))
-(struct: #export Monoid (All [a]
+(structure: #export Monoid (All [a]
(Monoid (List a)))
(def: identity #.Nil)
(def: (compose xs ys)
@@ -290,7 +290,7 @@
(open: Monoid)
-(struct: #export _ (Functor List)
+(structure: #export _ (Functor List)
(def: (map f ma)
(case ma
#.Nil #.Nil
@@ -298,7 +298,7 @@
(open: Functor)
-(struct: #export _ (Apply List)
+(structure: #export _ (Apply List)
(def: functor Functor)
(def: (apply ff fa)
@@ -309,7 +309,7 @@
(#.Cons f ff')
(compose (map f fa) (apply ff' fa)))))
-(struct: #export _ (Monad List)
+(structure: #export _ (Monad List)
(def: functor Functor)
(def: (wrap a)
@@ -511,7 +511,7 @@
(All [a] (-> (List (List a)) (List a)))
(:: Monad join xss))
-(struct: #export (ListT Monad)
+(structure: #export (ListT Monad)
(All [M] (-> (Monad M) (Monad (All [a] (M (List a))))))
(def: functor (functor.compose (get@ #monad.functor Monad) Functor))
diff --git a/stdlib/source/lux/data/coll/queue.lux b/stdlib/source/lux/data/coll/queue.lux
index 490351d29..3b144a52a 100644
--- a/stdlib/source/lux/data/coll/queue.lux
+++ b/stdlib/source/lux/data/coll/queue.lux
@@ -67,12 +67,12 @@
_
(update@ #rear (|>> (#.Cons val)) queue)))
-(struct: #export (Equivalence Equivalence)
+(structure: #export (Equivalence Equivalence)
(All [a] (-> (Equivalence a) (Equivalence (Queue a))))
(def: (= qx qy)
(:: (list.Equivalence Equivalence) = (to-list qx) (to-list qy))))
-(struct: #export _ (F.Functor Queue)
+(structure: #export _ (F.Functor Queue)
(def: (map f fa)
{#front (|> fa (get@ #front) (L/map f))
#rear (|> fa (get@ #rear) (L/map f))}))
diff --git a/stdlib/source/lux/data/coll/row.lux b/stdlib/source/lux/data/coll/row.lux
index 2c50120ec..1d4dc648c 100644
--- a/stdlib/source/lux/data/coll/row.lux
+++ b/stdlib/source/lux/data/coll/row.lux
@@ -343,7 +343,7 @@
(wrap (list (` (from-list (list (~+ elems)))))))
## [Structures]
-(struct: #export (Equivalence Equivalence) (All [a] (-> (Equivalence a) (Equivalence (Node a))))
+(structure: #export (Equivalence Equivalence) (All [a] (-> (Equivalence a) (Equivalence (Node a))))
(def: (= v1 v2)
(case [v1 v2]
[(#Base b1) (#Base b2)]
@@ -355,7 +355,7 @@
_
false)))
-(struct: #export (Equivalence Equivalence) (All [a] (-> (Equivalence a) (Equivalence (Row a))))
+(structure: #export (Equivalence Equivalence) (All [a] (-> (Equivalence a) (Equivalence (Row a))))
(def: (= v1 v2)
(and (n/= (get@ #size v1) (get@ #size v2))
(let [(^open "Node/") (Equivalence Equivalence)]
@@ -364,7 +364,7 @@
(Node/= (#Hierarchy (get@ #root v1))
(#Hierarchy (get@ #root v2))))))))
-(struct: _ (Fold Node)
+(structure: _ (Fold Node)
(def: (fold f init xs)
(case xs
(#Base base)
@@ -376,7 +376,7 @@
hierarchy))
))
-(struct: #export _ (Fold Row)
+(structure: #export _ (Fold Row)
(def: (fold f init xs)
(let [(^open) Fold]
(fold f
@@ -386,12 +386,12 @@
(#Base (get@ #tail xs))))
))
-(struct: #export Monoid (All [a] (Monoid (Row a)))
+(structure: #export Monoid (All [a] (Monoid (Row a)))
(def: identity empty)
(def: (compose xs ys)
(list/fold add xs (to-list ys))))
-(struct: _ (Functor Node)
+(structure: _ (Functor Node)
(def: (map f xs)
(case xs
(#Base base)
@@ -401,7 +401,7 @@
(#Hierarchy (array/map (map f) hierarchy)))
))
-(struct: #export _ (Functor Row)
+(structure: #export _ (Functor Row)
(def: (map f xs)
{#level (get@ #level xs)
#size (get@ #size xs)
@@ -409,7 +409,7 @@
#tail (|> xs (get@ #tail) (array/map f))
}))
-(struct: #export _ (Apply Row)
+(structure: #export _ (Apply Row)
(def: functor Functor)
(def: (apply ff fa)
@@ -420,7 +420,7 @@
ff)]
(fold compose identity results))))
-(struct: #export _ (Monad Row)
+(structure: #export _ (Monad Row)
(def: functor Functor)
(def: wrap (|>> row))
diff --git a/stdlib/source/lux/data/coll/sequence.lux b/stdlib/source/lux/data/coll/sequence.lux
index b8908403b..ab8f1d625 100644
--- a/stdlib/source/lux/data/coll/sequence.lux
+++ b/stdlib/source/lux/data/coll/sequence.lux
@@ -117,12 +117,12 @@
[(filter p xs) (filter (complement p) xs)])
## [Structures]
-(struct: #export _ (Functor Sequence)
+(structure: #export _ (Functor Sequence)
(def: (map f fa)
(let [[h t] (continuation.run fa)]
(pending [(f h) (map f t)]))))
-(struct: #export _ (CoMonad Sequence)
+(structure: #export _ (CoMonad Sequence)
(def: functor Functor)
(def: unwrap head)
(def: (split wa)
diff --git a/stdlib/source/lux/data/coll/set/ordered.lux b/stdlib/source/lux/data/coll/set/ordered.lux
index 0862d62c2..45a6b0cb0 100644
--- a/stdlib/source/lux/data/coll/set/ordered.lux
+++ b/stdlib/source/lux/data/coll/set/ordered.lux
@@ -80,7 +80,7 @@
(All [a] (-> (Set a) (Set a) Bool))
(sub? super sub))
-(struct: #export Equivalence (All [a] (Equivalence (Set a)))
+(structure: #export Equivalence (All [a] (Equivalence (Set a)))
(def: (= reference sample)
(:: (list.Equivalence (:: sample eq))
= (to-list reference) (to-list sample))))
diff --git a/stdlib/source/lux/data/coll/set/unordered.lux b/stdlib/source/lux/data/coll/set/unordered.lux
index 4fcc0c1cc..6f0007412 100644
--- a/stdlib/source/lux/data/coll/set/unordered.lux
+++ b/stdlib/source/lux/data/coll/set/unordered.lux
@@ -63,11 +63,11 @@
(sub? super sub))
## [Structures]
-(struct: #export Equivalence (All [a] (Equivalence (Set a)))
+(structure: #export Equivalence (All [a] (Equivalence (Set a)))
(def: (= (^@ test [Hash _]) subject)
(:: (list.Equivalence (get@ #hash.eq Hash)) = (to-list test) (to-list subject))))
-(struct: #export Hash (All [a] (Hash (Set a)))
+(structure: #export Hash (All [a] (Hash (Set a)))
(def: eq Equivalence)
(def: (hash (^@ set [Hash _]))
diff --git a/stdlib/source/lux/data/coll/tree/rose.lux b/stdlib/source/lux/data/coll/tree/rose.lux
index 8171dcdaa..1fb5fc85a 100644
--- a/stdlib/source/lux/data/coll/tree/rose.lux
+++ b/stdlib/source/lux/data/coll/tree/rose.lux
@@ -54,18 +54,18 @@
#children (list (~+ (L/map recur children)))})))))))
## [Structs]
-(struct: #export (Equivalence Equivalence) (All [a] (-> (Equivalence a) (Equivalence (Tree a))))
+(structure: #export (Equivalence Equivalence) (All [a] (-> (Equivalence a) (Equivalence (Tree a))))
(def: (= tx ty)
(and (:: Equivalence = (get@ #value tx) (get@ #value ty))
(:: (list.Equivalence (Equivalence Equivalence)) = (get@ #children tx) (get@ #children ty)))))
-(struct: #export _ (Functor Tree)
+(structure: #export _ (Functor Tree)
(def: (map f fa)
{#value (f (get@ #value fa))
#children (L/map (map f)
(get@ #children fa))}))
-(struct: #export _ (Fold Tree)
+(structure: #export _ (Fold Tree)
(def: (fold f init tree)
(L/fold (function (_ tree' init') (fold f init' tree'))
(f (get@ #value tree)
diff --git a/stdlib/source/lux/data/coll/tree/rose/zipper.lux b/stdlib/source/lux/data/coll/tree/rose/zipper.lux
index 845dd4c4c..ba47b9f0a 100644
--- a/stdlib/source/lux/data/coll/tree/rose/zipper.lux
+++ b/stdlib/source/lux/data/coll/tree/rose/zipper.lux
@@ -211,7 +211,7 @@
[insert-right #rights]
)
-(struct: #export _ (Functor Zipper)
+(structure: #export _ (Functor Zipper)
(def: (map f fa)
{#parent (|> fa (get@ #parent) (M/map (map f)))
#lefts (|> fa (get@ #lefts) (L/map (T/map f)))
@@ -219,7 +219,7 @@
#node (T/map f (get@ #node fa))}))
## TODO: Add again once new-luxc becomes the standard compiler.
-## (struct: #export _ (CoMonad Zipper)
+## (structure: #export _ (CoMonad Zipper)
## (def: functor Functor)
## (def: unwrap (get@ [#node #rose.value]))
diff --git a/stdlib/source/lux/data/color.lux b/stdlib/source/lux/data/color.lux
index 67c9c3388..7a23be703 100644
--- a/stdlib/source/lux/data/color.lux
+++ b/stdlib/source/lux/data/color.lux
@@ -33,7 +33,7 @@
(-> Color [Nat Nat Nat])
(|>> :representation))
- (struct: #export _ (eq.Equivalence Color)
+ (structure: #export _ (eq.Equivalence Color)
(def: (= reference sample)
(let [[rr rg rb] (:representation reference)
[sr sg sb] (:representation sample)]
diff --git a/stdlib/source/lux/data/env.lux b/stdlib/source/lux/data/env.lux
index 880bfa621..68d0affc0 100644
--- a/stdlib/source/lux/data/env.lux
+++ b/stdlib/source/lux/data/env.lux
@@ -7,11 +7,11 @@
{#env e
#value a})
-(struct: #export Functor (All [e] (F.Functor (Env e)))
+(structure: #export Functor (All [e] (F.Functor (Env e)))
(def: (map f fa)
(update@ #value f fa)))
-(struct: #export CoMonad (All [e] (CoMonad (Env e)))
+(structure: #export CoMonad (All [e] (CoMonad (Env e)))
(def: functor Functor)
(def: unwrap (get@ #value))
diff --git a/stdlib/source/lux/data/error.lux b/stdlib/source/lux/data/error.lux
index 5e7f07601..6e9f12cb0 100644
--- a/stdlib/source/lux/data/error.lux
+++ b/stdlib/source/lux/data/error.lux
@@ -10,13 +10,13 @@
(#Success a))
## [Structures]
-(struct: #export _ (F.Functor Error)
+(structure: #export _ (F.Functor Error)
(def: (map f ma)
(case ma
(#Error msg) (#Error msg)
(#Success datum) (#Success (f datum)))))
-(struct: #export _ (A.Apply Error)
+(structure: #export _ (A.Apply Error)
(def: functor Functor)
(def: (apply ff fa)
@@ -33,7 +33,7 @@
(#Error msg))
))
-(struct: #export _ (Monad Error)
+(structure: #export _ (Monad Error)
(def: functor Functor)
(def: (wrap a)
@@ -44,7 +44,7 @@
(#Error msg) (#Error msg)
(#Success ma) ma)))
-(struct: #export (ErrorT Monad)
+(structure: #export (ErrorT Monad)
(All [M] (-> (Monad M) (Monad (All [a] (M (Error a))))))
(def: functor (F.compose (get@ #M.functor Monad) Functor))
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux
index 984fbb1aa..01652968f 100644
--- a/stdlib/source/lux/data/format/json.lux
+++ b/stdlib/source/lux/data/format/json.lux
@@ -147,7 +147,7 @@
[get-object #Object Object "objects"]
)
-(struct: #export _ (Equivalence JSON)
+(structure: #export _ (Equivalence JSON)
(def: (= x y)
(case [x y]
[#Null #Null]
@@ -495,6 +495,6 @@
(-> Any (l.Lexer JSON))
($_ p.alt null~ boolean~ number~ string~ (array~ json~') (object~ json~')))
-(struct: #export _ (Codec Text JSON)
+(structure: #export _ (Codec Text JSON)
(def: encode show-json)
(def: decode (function (_ input) (l.run input (json~' [])))))
diff --git a/stdlib/source/lux/data/format/xml.lux b/stdlib/source/lux/data/format/xml.lux
index 7d1614fca..ddfb06249 100644
--- a/stdlib/source/lux/data/format/xml.lux
+++ b/stdlib/source/lux/data/format/xml.lux
@@ -220,11 +220,11 @@
(text.join-with ""))
"" tag ">")))))))
-(struct: #export _ (Codec Text XML)
+(structure: #export _ (Codec Text XML)
(def: encode write)
(def: decode read))
-(struct: #export _ (Equivalence XML)
+(structure: #export _ (Equivalence XML)
(def: (= reference sample)
(case [reference sample]
[(#Text reference/value) (#Text sample/value)]
diff --git a/stdlib/source/lux/data/ident.lux b/stdlib/source/lux/data/ident.lux
index cb0b35b1f..f75b89ab8 100644
--- a/stdlib/source/lux/data/ident.lux
+++ b/stdlib/source/lux/data/ident.lux
@@ -20,12 +20,12 @@
)
## [Structures]
-(struct: #export _ (Equivalence Ident)
+(structure: #export _ (Equivalence Ident)
(def: (= [xmodule xname] [ymodule yname])
(and (text/= xmodule ymodule)
(text/= xname yname))))
-(struct: #export _ (Codec Text Ident)
+(structure: #export _ (Codec Text Ident)
(def: (encode [module name])
(case module
"" name
@@ -44,7 +44,7 @@
_
(#.Left (text/compose "Invalid format for Ident: " input))))))
-(struct: #export _ (Hash Ident)
+(structure: #export _ (Hash Ident)
(def: eq Equivalence)
(def: (hash [module name])
diff --git a/stdlib/source/lux/data/identity.lux b/stdlib/source/lux/data/identity.lux
index b14658619..969b89e4d 100644
--- a/stdlib/source/lux/data/identity.lux
+++ b/stdlib/source/lux/data/identity.lux
@@ -10,20 +10,20 @@
a)
## [Structures]
-(struct: #export _ (F.Functor Identity)
+(structure: #export _ (F.Functor Identity)
(def: map id))
-(struct: #export _ (A.Apply Identity)
+(structure: #export _ (A.Apply Identity)
(def: functor Functor)
(def: (apply ff fa)
(ff fa)))
-(struct: #export _ (Monad Identity)
+(structure: #export _ (Monad Identity)
(def: functor Functor)
(def: wrap id)
(def: join id))
-(struct: #export _ (CoMonad Identity)
+(structure: #export _ (CoMonad Identity)
(def: functor Functor)
(def: unwrap id)
(def: split id))
diff --git a/stdlib/source/lux/data/lazy.lux b/stdlib/source/lux/data/lazy.lux
index 94932a497..5a7228935 100644
--- a/stdlib/source/lux/data/lazy.lux
+++ b/stdlib/source/lux/data/lazy.lux
@@ -33,16 +33,16 @@
(with-gensyms [g!_]
(wrap (list (` ((~! freeze') (function ((~ g!_) (~ g!_)) (~ expr))))))))
-(struct: #export _ (Functor Lazy)
+(structure: #export _ (Functor Lazy)
(def: (map f fa)
(freeze (f (thaw fa)))))
-(struct: #export _ (Apply Lazy)
+(structure: #export _ (Apply Lazy)
(def: functor Functor)
(def: (apply ff fa)
(freeze ((thaw ff) (thaw fa)))))
-(struct: #export _ (Monad Lazy)
+(structure: #export _ (Monad Lazy)
(def: functor Functor)
(def: wrap (|>> freeze))
(def: join thaw))
diff --git a/stdlib/source/lux/data/maybe.lux b/stdlib/source/lux/data/maybe.lux
index bfdb0fbe5..dfc2a557b 100644
--- a/stdlib/source/lux/data/maybe.lux
+++ b/stdlib/source/lux/data/maybe.lux
@@ -12,20 +12,20 @@
## (#.Some a))
## [Structures]
-(struct: #export Monoid (All [a] (m.Monoid (Maybe a)))
+(structure: #export Monoid (All [a] (m.Monoid (Maybe a)))
(def: identity #.None)
(def: (compose xs ys)
(case xs
#.None ys
(#.Some x) (#.Some x))))
-(struct: #export _ (F.Functor Maybe)
+(structure: #export _ (F.Functor Maybe)
(def: (map f ma)
(case ma
#.None #.None
(#.Some a) (#.Some (f a)))))
-(struct: #export _ (A.Apply Maybe)
+(structure: #export _ (A.Apply Maybe)
(def: functor Functor)
(def: (apply ff fa)
@@ -36,7 +36,7 @@
_
#.None)))
-(struct: #export _ (Monad Maybe)
+(structure: #export _ (Monad Maybe)
(def: functor Functor)
(def: (wrap x)
@@ -47,7 +47,7 @@
#.None #.None
(#.Some xs) xs)))
-(struct: #export (Equivalence Equivalence) (All [a] (-> (Equivalence a) (Equivalence (Maybe a))))
+(structure: #export (Equivalence Equivalence) (All [a] (-> (Equivalence a) (Equivalence (Maybe a))))
(def: (= mx my)
(case [mx my]
[#.None #.None]
@@ -59,7 +59,7 @@
_
false)))
-(struct: #export (MaybeT Monad)
+(structure: #export (MaybeT Monad)
(All [M] (-> (Monad M) (Monad (All [a] (M (Maybe a))))))
(def: functor (F.compose (get@ #monad.functor Monad) Functor))
diff --git a/stdlib/source/lux/data/number.lux b/stdlib/source/lux/data/number.lux
index 637d0d0ba..5a32e6ada 100644
--- a/stdlib/source/lux/data/number.lux
+++ b/stdlib/source/lux/data/number.lux
@@ -14,7 +14,7 @@
## [Structures]
(do-template [ ]
- [(struct: #export _ (Equivalence )
+ [(structure: #export _ (Equivalence )
(def: = ))]
[ Nat n/=]
@@ -24,7 +24,7 @@
)
(do-template [ ]
- [(struct: #export _ (order.Order )
+ [(structure: #export _ (order.Order )
(def: eq )
(def: < )
(def: <= )
@@ -37,7 +37,7 @@
[Frac Equivalence f/< f/<= f/> f/>=]
)
-(struct: #export _ (Number Nat)
+(structure: #export _ (Number Nat)
(def: + n/+)
(def: - n/-)
(def: * n/*)
@@ -52,7 +52,7 @@
)
(do-template [ <+> <-> <*> > <%> <=> <<> <0> <1> <-1>]
- [(struct: #export _ (Number