aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorEduardo Julian2017-11-15 22:04:44 -0400
committerEduardo Julian2017-11-15 22:04:44 -0400
commit53ccae1625d46cf57247b9fb1cb9f4c28b0a0ad4 (patch)
tree84154fb7a50286cd64a919c8698581c9260ff09d /stdlib
parent360c8f0cd43452d4a47cdd2002625143b96df6c8 (diff)
- Moved "/type" and "/type/check" from "lux/meta" to "lux/lang".
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/concurrency/actor.lux28
-rw-r--r--stdlib/source/lux/data/format/json.lux4
-rw-r--r--stdlib/source/lux/data/text/format.lux4
-rw-r--r--stdlib/source/lux/host.jvm.lux4
-rw-r--r--stdlib/source/lux/lang/type.lux (renamed from stdlib/source/lux/meta/type.lux)0
-rw-r--r--stdlib/source/lux/lang/type/check.lux (renamed from stdlib/source/lux/meta/type/check.lux)2
-rw-r--r--stdlib/source/lux/meta/poly.lux4
-rw-r--r--stdlib/source/lux/meta/poly/eq.lux2
-rw-r--r--stdlib/source/lux/meta/poly/functor.lux4
-rw-r--r--stdlib/source/lux/meta/poly/json.lux8
-rw-r--r--stdlib/source/lux/meta/type/implicit.lux4
-rw-r--r--stdlib/source/lux/meta/type/object.lux4
-rw-r--r--stdlib/test/test/lux/lang/type.lux (renamed from stdlib/test/test/lux/meta/type.lux)2
-rw-r--r--stdlib/test/test/lux/lang/type/check.lux (renamed from stdlib/test/test/lux/meta/type/check.lux)2
-rw-r--r--stdlib/test/test/lux/meta/type/implicit.lux19
-rw-r--r--stdlib/test/tests.lux8
16 files changed, 48 insertions, 51 deletions
diff --git a/stdlib/source/lux/concurrency/actor.lux b/stdlib/source/lux/concurrency/actor.lux
index c09cde8bc..fea0ca422 100644
--- a/stdlib/source/lux/concurrency/actor.lux
+++ b/stdlib/source/lux/concurrency/actor.lux
@@ -5,7 +5,7 @@
["ex" exception #+ exception:])
[io #- run "io/" Monad<IO>]
(data text/format
- (coll [list "L/" Monoid<List> Monad<List> Fold<List>])
+ (coll [list "list/" Monoid<List> Monad<List> Fold<List>])
[product])
[meta #+ with-gensyms Monad<Meta>]
(meta [code]
@@ -13,8 +13,8 @@
(syntax ["cs" common]
(common ["csr" reader]
["csw" writer]))
- [type]
- (type opaque)))
+ (type opaque))
+ (lang [type]))
(.. ["A" atom]
["P" promise "P/" Monad<Promise>]
["T" task]
@@ -229,7 +229,7 @@
g!behavior (code;local-symbol (behavior-name _name))
g!actor (code;local-symbol _name)
g!new (code;local-symbol (new-name _name))
- g!vars (L/map code;local-symbol _vars)]]
+ g!vars (list/map code;local-symbol _vars)]]
(wrap (list (` (type: (~@ (csw;export export)) ((~ g!type) (~@ g!vars))
(~ state-type)))
(` (type: (~@ (csw;export export)) ((~ g!actor) (~@ g!vars))
@@ -313,29 +313,29 @@
[actor-name (resolve-actor actor-name)
#let [g!type (code;symbol (product;both id state-name actor-name))
g!message (code;local-symbol (get@ #name signature))
- g!actor-vars (L/map code;local-symbol actor-vars)
+ g!actor-vars (list/map code;local-symbol actor-vars)
g!actor (` ((~ (code;symbol actor-name)) (~@ g!actor-vars)))
- g!all-vars (|> (get@ #vars signature) (L/map code;local-symbol) (L/compose g!actor-vars))
- g!inputsC (|> (get@ #inputs signature) (L/map (|>. product;left code;local-symbol)))
- g!inputsT (|> (get@ #inputs signature) (L/map product;right))
+ g!all-vars (|> (get@ #vars signature) (list/map code;local-symbol) (list/compose g!actor-vars))
+ g!inputsC (|> (get@ #inputs signature) (list/map (|>. product;left code;local-symbol)))
+ g!inputsT (|> (get@ #inputs signature) (list/map product;right))
g!state (|> signature (get@ #state) code;local-symbol)
g!self (|> signature (get@ #self) code;local-symbol)
g!actor-refs (: (List Code)
(if (list;empty? actor-vars)
(list)
(|> actor-vars list;size n.dec
- (list;n.range +0) (L/map (|>. code;nat (~) ($) (`))))))
+ (list;n.range +0) (list/map (|>. code;nat (~) ($) (`))))))
ref-replacements (|> (if (list;empty? actor-vars)
(list)
(|> actor-vars list;size n.dec
- (list;n.range +0) (L/map (|>. code;nat (~) ($) (`)))))
+ (list;n.range +0) (list/map (|>. code;nat (~) ($) (`)))))
(: (List Code))
(list;zip2 g!all-vars)
(: (List [Code Code])))
- g!outputT (L/fold (function [[g!var g!ref] outputT]
- (code;replace g!var g!ref outputT))
- (get@ #output signature)
- ref-replacements)]]
+ g!outputT (list/fold (function [[g!var g!ref] outputT]
+ (code;replace g!var g!ref outputT))
+ (get@ #output signature)
+ ref-replacements)]]
(wrap (list (` (def: (~@ (csw;export export)) ((~ g!message) (~@ g!inputsC) (~ g!self))
(~ (|> annotations
(with-message actor-name)
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux
index 899cd652a..8f664d6ea 100644
--- a/stdlib/source/lux/data/format/json.lux
+++ b/stdlib/source/lux/data/format/json.lux
@@ -20,8 +20,8 @@
[meta #+ Monad<Meta> with-gensyms]
(meta ["s" syntax #+ syntax:]
[code]
- [poly #+ poly:]
- [type])
+ [poly #+ poly:])
+ (lang [type])
))
(do-template [<name> <type>]
diff --git a/stdlib/source/lux/data/text/format.lux b/stdlib/source/lux/data/text/format.lux
index 323ce1efb..161288d86 100644
--- a/stdlib/source/lux/data/text/format.lux
+++ b/stdlib/source/lux/data/text/format.lux
@@ -14,8 +14,8 @@
[date])
[meta]
(meta [code]
- ["s" syntax #+ syntax: Syntax]
- [type])))
+ ["s" syntax #+ syntax: Syntax])
+ (lang [type])))
## [Syntax]
(def: #hidden _compose_
diff --git a/stdlib/source/lux/host.jvm.lux b/stdlib/source/lux/host.jvm.lux
index 6c3f18b19..1b77e3016 100644
--- a/stdlib/source/lux/host.jvm.lux
+++ b/stdlib/source/lux/host.jvm.lux
@@ -13,8 +13,8 @@
[bool "bool/" Codec<Text,Bool>])
[meta #+ with-gensyms Functor<Meta> Monad<Meta>]
(meta [code]
- ["s" syntax #+ syntax: Syntax]
- [type])
+ ["s" syntax #+ syntax: Syntax])
+ (lang [type])
))
(do-template [<name> <op> <from> <to>]
diff --git a/stdlib/source/lux/meta/type.lux b/stdlib/source/lux/lang/type.lux
index 9d6ed5162..9d6ed5162 100644
--- a/stdlib/source/lux/meta/type.lux
+++ b/stdlib/source/lux/lang/type.lux
diff --git a/stdlib/source/lux/meta/type/check.lux b/stdlib/source/lux/lang/type/check.lux
index 91e8f3bdf..cbf31ac08 100644
--- a/stdlib/source/lux/meta/type/check.lux
+++ b/stdlib/source/lux/lang/type/check.lux
@@ -11,7 +11,7 @@
(coll [list]
[set #+ Set])
["e" error])
- (meta [type "type/" Eq<Type>])
+ (lang [type "type/" Eq<Type>])
))
(exception: #export Unknown-Type-Var)
diff --git a/stdlib/source/lux/meta/poly.lux b/stdlib/source/lux/meta/poly.lux
index c374e585c..432d9385a 100644
--- a/stdlib/source/lux/meta/poly.lux
+++ b/stdlib/source/lux/meta/poly.lux
@@ -18,8 +18,8 @@
["s" syntax #+ syntax: Syntax]
(syntax ["cs" common]
(common ["csr" reader]
- ["csw" writer]))
- [type]
+ ["csw" writer])))
+ (lang [type]
(type [check]))
))
diff --git a/stdlib/source/lux/meta/poly/eq.lux b/stdlib/source/lux/meta/poly/eq.lux
index 38386a6c8..a57a9e5de 100644
--- a/stdlib/source/lux/meta/poly/eq.lux
+++ b/stdlib/source/lux/meta/poly/eq.lux
@@ -24,8 +24,8 @@
[syntax #+ syntax: Syntax]
(syntax [common])
[poly #+ poly:]
- [type]
(type [unit]))
+ (lang [type])
))
## [Derivers]
diff --git a/stdlib/source/lux/meta/poly/functor.lux b/stdlib/source/lux/meta/poly/functor.lux
index 7dc20edaf..0e140e9e4 100644
--- a/stdlib/source/lux/meta/poly/functor.lux
+++ b/stdlib/source/lux/meta/poly/functor.lux
@@ -11,8 +11,8 @@
(meta [code]
[syntax #+ syntax: Syntax]
(syntax [common])
- [poly #+ poly:]
- [type])
+ [poly #+ poly:])
+ (lang [type])
))
(poly: #export Functor<?>
diff --git a/stdlib/source/lux/meta/poly/json.lux b/stdlib/source/lux/meta/poly/json.lux
index 0569d03d5..703bbf109 100644
--- a/stdlib/source/lux/meta/poly/json.lux
+++ b/stdlib/source/lux/meta/poly/json.lux
@@ -10,7 +10,7 @@
(text ["l" lexer])
[number "frac/" Codec<Text,Frac> "nat/" Codec<Text,Nat>]
maybe
- ["E" error]
+ ["e" error]
[sum]
[product]
(coll [list "list/" Fold<List> Monad<List>]
@@ -24,8 +24,8 @@
(meta ["s" syntax #+ syntax:]
[code]
[poly #+ poly:]
- [type]
(type [unit]))
+ (lang [type])
))
(def: #hidden _map_
@@ -63,7 +63,7 @@
(struct: #hidden _ (Codec JSON Int)
(def: encode (|>. int-to-nat (:: Codec<JSON,Nat> encode)))
(def: decode
- (|>. (:: Codec<JSON,Nat> decode) (:: E;Functor<Error> map nat-to-int))))
+ (|>. (:: Codec<JSON,Nat> decode) (:: e;Functor<Error> map nat-to-int))))
(def: #hidden (nullable writer)
{#;doc "Builds a JSON generator for potentially inexistent values."}
@@ -78,7 +78,7 @@
(def: encode
(|>. unit;out (:: Codec<JSON,Int> encode)))
(def: decode
- (|>. (:: Codec<JSON,Int> decode) (:: E;Functor<Error> map (unit;in carrier)))))
+ (|>. (:: Codec<JSON,Int> decode) (:: e;Functor<Error> map (unit;in carrier)))))
(poly: #hidden Codec<JSON,?>//encode
(with-expansions
diff --git a/stdlib/source/lux/meta/type/implicit.lux b/stdlib/source/lux/meta/type/implicit.lux
index a2013d3b1..54fec2626 100644
--- a/stdlib/source/lux/meta/type/implicit.lux
+++ b/stdlib/source/lux/meta/type/implicit.lux
@@ -13,8 +13,8 @@
[maybe])
[meta #+ Monad<Meta>]
(meta [code]
- ["s" syntax #+ syntax: Syntax]
- [type]
+ ["s" syntax #+ syntax: Syntax])
+ (lang [type]
(type ["tc" check #+ Check Monad<Check>]))
))
diff --git a/stdlib/source/lux/meta/type/object.lux b/stdlib/source/lux/meta/type/object.lux
index 43b563122..0eb354242 100644
--- a/stdlib/source/lux/meta/type/object.lux
+++ b/stdlib/source/lux/meta/type/object.lux
@@ -14,8 +14,8 @@
["s" syntax #+ syntax:]
(syntax ["cs" common]
(common ["csr" reader]
- ["csw" writer]))
- [type])))
+ ["csw" writer])))
+ (lang [type])))
## [Common]
(type: Declaration
diff --git a/stdlib/test/test/lux/meta/type.lux b/stdlib/test/test/lux/lang/type.lux
index abddcc033..a592df312 100644
--- a/stdlib/test/test/lux/meta/type.lux
+++ b/stdlib/test/test/lux/lang/type.lux
@@ -9,7 +9,7 @@
[maybe]
(coll [list]))
["r" math/random]
- (meta ["&" type]))
+ (lang ["&" type]))
lux/test)
## [Utils]
diff --git a/stdlib/test/test/lux/meta/type/check.lux b/stdlib/test/test/lux/lang/type/check.lux
index 127e02cbd..32f7e832b 100644
--- a/stdlib/test/test/lux/meta/type/check.lux
+++ b/stdlib/test/test/lux/lang/type/check.lux
@@ -11,7 +11,7 @@
(coll [list "list/" Functor<List>]
[set]))
["r" math/random]
- (meta [type "type/" Eq<Type>]
+ (lang [type "type/" Eq<Type>]
["@" type/check]))
lux/test)
diff --git a/stdlib/test/test/lux/meta/type/implicit.lux b/stdlib/test/test/lux/meta/type/implicit.lux
index 8c05b01af..6d2344120 100644
--- a/stdlib/test/test/lux/meta/type/implicit.lux
+++ b/stdlib/test/test/lux/meta/type/implicit.lux
@@ -4,15 +4,12 @@
(control [monad #+ do Monad]
functor
[eq])
- (data [text "Text/" Monoid<Text>]
- text/format
- [number]
- [bool "B/" Eq<Bool>]
+ (data [number]
+ [bool "bool/" Eq<Bool>]
maybe
(coll [list]))
["r" math/random]
- (meta [type]
- type/implicit))
+ (meta type/implicit))
lux/test)
(context: "Automatic structure selection"
@@ -22,11 +19,11 @@
y r;nat]
($_ seq
(test "Can automatically select first-order structures."
- (let [(^open "L/") (list;Eq<List> number;Eq<Nat>)]
- (and (B/= (:: number;Eq<Nat> = x y)
- (::: = x y))
- (L/= (list;n.range +1 +10)
- (::: map n.inc (list;n.range +0 +9)))
+ (let [(^open "list/") (list;Eq<List> number;Eq<Nat>)]
+ (and (bool/= (:: number;Eq<Nat> = x y)
+ (::: = x y))
+ (list/= (list;n.range +1 +10)
+ (::: map n.inc (list;n.range +0 +9)))
)))
(test "Can automatically select second-order structures."
diff --git a/stdlib/test/tests.lux b/stdlib/test/tests.lux
index d4e038774..3e1d6b5f3 100644
--- a/stdlib/test/tests.lux
+++ b/stdlib/test/tests.lux
@@ -66,11 +66,11 @@
["_;" syntax]
(poly ["poly_;" eq]
["poly_;" functor])
- ["_;" type]
- (type ["_;" check]
- ["_;" implicit]
+ (type ["_;" implicit]
["_;" object]))
- (lang ["lang_;" syntax])
+ (lang ["lang_;" syntax]
+ ["_;" type]
+ (type ["_;" check]))
(world ["_;" blob]
["_;" file]
(net ["_;" tcp]