aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux
diff options
context:
space:
mode:
authorEduardo Julian2017-11-26 22:52:18 -0400
committerEduardo Julian2017-11-26 22:52:18 -0400
commit6031fc715b4a16b008d6f288c38739d9bb066490 (patch)
tree04f17f76449565c547bb90d3a6a67fb9704210cd /stdlib/source/lux
parent74fd0966b60a3594b5f6d289d837207718352ef2 (diff)
- Changed to the new relative imports syntax.
Diffstat (limited to 'stdlib/source/lux')
-rw-r--r--stdlib/source/lux/concurrency/actor.lux2
-rw-r--r--stdlib/source/lux/concurrency/frp.lux2
-rw-r--r--stdlib/source/lux/control/applicative.lux2
-rw-r--r--stdlib/source/lux/control/comonad.lux2
-rw-r--r--stdlib/source/lux/control/hash.lux2
-rw-r--r--stdlib/source/lux/control/monad.lux2
-rw-r--r--stdlib/source/lux/control/order.lux2
-rw-r--r--stdlib/source/lux/data/coll/tree/parser.lux2
-rw-r--r--stdlib/source/lux/macro.lux2
-rw-r--r--stdlib/source/lux/macro/poly/json.lux76
-rw-r--r--stdlib/source/lux/macro/syntax.lux2
-rw-r--r--stdlib/source/lux/macro/syntax/common/reader.lux14
-rw-r--r--stdlib/source/lux/macro/syntax/common/writer.lux6
-rw-r--r--stdlib/source/lux/math/logic/fuzzy.lux2
-rw-r--r--stdlib/source/lux/time/instant.lux2
-rw-r--r--stdlib/source/lux/world/net/tcp.jvm.lux6
-rw-r--r--stdlib/source/lux/world/net/udp.jvm.lux10
17 files changed, 68 insertions, 68 deletions
diff --git a/stdlib/source/lux/concurrency/actor.lux b/stdlib/source/lux/concurrency/actor.lux
index 848350499..dbe11b3a0 100644
--- a/stdlib/source/lux/concurrency/actor.lux
+++ b/stdlib/source/lux/concurrency/actor.lux
@@ -15,7 +15,7 @@
["csw" writer])))
(type opaque)
(lang [type]))
- (.. ["A" atom]
+ (// ["A" atom]
["P" promise "P/" Monad<Promise>]
["T" task]
[stm #+ Monad<STM>]
diff --git a/stdlib/source/lux/concurrency/frp.lux b/stdlib/source/lux/concurrency/frp.lux
index d59b96563..ce5069b45 100644
--- a/stdlib/source/lux/concurrency/frp.lux
+++ b/stdlib/source/lux/concurrency/frp.lux
@@ -10,7 +10,7 @@
text/format)
[macro]
(macro ["s" syntax #+ syntax: Syntax]))
- (.. ["&" promise]))
+ (// ["&" promise]))
## [Types]
(type: #export (Channel a)
diff --git a/stdlib/source/lux/control/applicative.lux b/stdlib/source/lux/control/applicative.lux
index d2b505941..935fda18e 100644
--- a/stdlib/source/lux/control/applicative.lux
+++ b/stdlib/source/lux/control/applicative.lux
@@ -1,6 +1,6 @@
(;module:
lux
- (.. [functor #+ Functor]))
+ (// [functor #+ Functor]))
(sig: #export (Applicative f)
{#;doc "Applicative functors."}
diff --git a/stdlib/source/lux/control/comonad.lux b/stdlib/source/lux/control/comonad.lux
index 7886d8c3c..15625b8f1 100644
--- a/stdlib/source/lux/control/comonad.lux
+++ b/stdlib/source/lux/control/comonad.lux
@@ -1,6 +1,6 @@
(;module:
lux
- ["F" ../functor]
+ ["F" //functor]
(lux/data/coll [list "list/" Fold<List>]))
## [Signatures]
diff --git a/stdlib/source/lux/control/hash.lux b/stdlib/source/lux/control/hash.lux
index 3472098c1..ae72d4cf0 100644
--- a/stdlib/source/lux/control/hash.lux
+++ b/stdlib/source/lux/control/hash.lux
@@ -1,6 +1,6 @@
(;module:
lux
- (.. [eq #+ Eq]))
+ (// [eq #+ Eq]))
## [Signatures]
(sig: #export (Hash a)
diff --git a/stdlib/source/lux/control/monad.lux b/stdlib/source/lux/control/monad.lux
index b9ecf5470..fb900d3e7 100644
--- a/stdlib/source/lux/control/monad.lux
+++ b/stdlib/source/lux/control/monad.lux
@@ -1,6 +1,6 @@
(;module:
lux
- (.. (functor #as F)
+ (// (functor #as F)
(applicative #as A)))
## [Utils]
diff --git a/stdlib/source/lux/control/order.lux b/stdlib/source/lux/control/order.lux
index 89708d986..fe8169443 100644
--- a/stdlib/source/lux/control/order.lux
+++ b/stdlib/source/lux/control/order.lux
@@ -1,7 +1,7 @@
(;module:
lux
(lux function)
- (.. [eq #+ Eq]))
+ (// [eq #+ Eq]))
## [Signatures]
(sig: #export (Order a)
diff --git a/stdlib/source/lux/data/coll/tree/parser.lux b/stdlib/source/lux/data/coll/tree/parser.lux
index 3b2400b92..ac6dc2a85 100644
--- a/stdlib/source/lux/data/coll/tree/parser.lux
+++ b/stdlib/source/lux/data/coll/tree/parser.lux
@@ -3,7 +3,7 @@
(lux (control ["p" parser]
["ex" exception #+ exception:])
(data ["E" error]))
- (.. ["T" rose]
+ (// ["T" rose]
["Z" zipper]))
(type: #export (Parser t a)
diff --git a/stdlib/source/lux/macro.lux b/stdlib/source/lux/macro.lux
index 33ac0b89b..e800efcd5 100644
--- a/stdlib/source/lux/macro.lux
+++ b/stdlib/source/lux/macro.lux
@@ -10,7 +10,7 @@
["e" error]
[text "text/" Monoid<Text> Eq<Text>]
(coll [list "list/" Monoid<List> Monad<List>])))
- (. [code]))
+ (/ [code]))
## (type: (Meta a)
## (-> Compiler (e;Error [Compiler a])))
diff --git a/stdlib/source/lux/macro/poly/json.lux b/stdlib/source/lux/macro/poly/json.lux
index 5c3a645ee..6b4d5fed5 100644
--- a/stdlib/source/lux/macro/poly/json.lux
+++ b/stdlib/source/lux/macro/poly/json.lux
@@ -16,7 +16,7 @@
(coll [list "list/" Fold<List> Monad<List>]
[sequence #+ Sequence sequence "sequence/" Monad<Sequence>]
["d" dict])
- (format [".." json #+ JSON]))
+ (format ["//" json #+ JSON]))
(time ["i" instant]
["du" duration]
["da" date])
@@ -50,13 +50,13 @@
(def: (encode input)
(let [high (|> input (bit;and high-mask) (bit;shift-right +32))
low (bit;and low-mask input)]
- (#..;Array (sequence (|> high nat-to-int int-to-frac #..;Number)
- (|> low nat-to-int int-to-frac #..;Number)))))
+ (#//;Array (sequence (|> high nat-to-int int-to-frac #//;Number)
+ (|> low nat-to-int int-to-frac #//;Number)))))
(def: (decode input)
- (<| (..;run input)
+ (<| (//;run input)
(do p;Monad<Parser>
- [high ..;number
- low ..;number])
+ [high //;number
+ low //;number])
(wrap (n.+ (|> high frac-to-int int-to-nat (bit;shift-left +32))
(|> low frac-to-int int-to-nat))))))
@@ -70,7 +70,7 @@
(All [a] (-> (-> a JSON) (-> (Maybe a) JSON)))
(function [elem]
(case elem
- #;None #..;Null
+ #;None #//;Null
(#;Some value) (writer value))))
(struct: #hidden (Codec<JSON,Qty> carrier)
@@ -88,17 +88,17 @@
(wrap (` (: (~ (@JSON//encode inputT))
<encoder>))))]
- [Unit poly;unit (function [(~ (code;symbol ["" "0"]))] #..;Null)]
- [Bool poly;bool (|>. #..;Boolean)]
+ [Unit poly;unit (function [(~ (code;symbol ["" "0"]))] #//;Null)]
+ [Bool poly;bool (|>. #//;Boolean)]
[Nat poly;nat (:: ;;Codec<JSON,Nat> (~' encode))]
[Int poly;int (:: ;;Codec<JSON,Int> (~' encode))]
- [Frac poly;frac (|>. #..;Number)]
- [Text poly;text (|>. #..;String)])
+ [Frac poly;frac (|>. #//;Number)]
+ [Text poly;text (|>. #//;String)])
<time> (do-template [<type> <codec>]
[(do @
[_ (poly;this <type>)]
(wrap (` (: (~ (@JSON//encode inputT))
- (|>. (:: <codec> (~' encode)) #..;String)))))]
+ (|>. (:: <codec> (~' encode)) #//;String)))))]
[du;Duration du;Codec<Text,Duration>]
[i;Instant i;Codec<Text,Instant>]
@@ -109,7 +109,7 @@
[*env* poly;env
#let [@JSON//encode (: (-> Type Code)
(function [type]
- (` (-> (~ (poly;to-ast *env* type)) ..;JSON))))]
+ (` (-> (~ (poly;to-ast *env* type)) //;JSON))))]
inputT poly;peek]
($_ p;either
<basic>
@@ -131,7 +131,7 @@
(;;_map_ (function [[(~ g!key) (~ g!val)]]
[(~ g!key) ((~ .val.) (~ g!val))]))
(d;from-list text;Hash<Text>)
- #..;Object)))))
+ #//;Object)))))
(do @
[[_ .sub.] (poly;apply ($_ p;seq
(poly;this ;Maybe)
@@ -143,7 +143,7 @@
(poly;this ;List)
Codec<JSON,?>//encode))]
(wrap (` (: (~ (@JSON//encode inputT))
- (|>. (;;_map_ (~ .sub.)) sequence;from-list #..;Array)))))
+ (|>. (;;_map_ (~ .sub.)) sequence;from-list #//;Array)))))
(do @
[#let [g!input (code;local-symbol "\u0000input")]
members (poly;variant (p;many Codec<JSON,?>//encode))]
@@ -152,7 +152,7 @@
(case (~ g!input)
(~@ (list/join (list/map (function [[tag g!encode]]
(list (` ((~ (code;nat tag)) (~ g!input)))
- (` (..;json [(~ (code;frac (;;tag tag)))
+ (` (//;json [(~ (code;frac (;;tag tag)))
((~ g!encode) (~ g!input))]))))
(list;enumerate members))))))))))
(do @
@@ -162,7 +162,7 @@
(list/map (|>. nat/encode code;local-symbol)))]]
(wrap (` (: (~ (@JSON//encode inputT))
(function [[(~@ g!members)]]
- (..;json [(~@ (list/map (function [[g!member g!encode]]
+ (//;json [(~@ (list/map (function [[g!member g!encode]]
(` ((~ g!encode) (~ g!member))))
(list;zip2 g!members g!encoders)))]))))))
## Type recursion
@@ -180,10 +180,10 @@
(do @
[[funcC varsC bodyC] (poly;polymorphic Codec<JSON,?>//encode)]
(wrap (` (: (All [(~@ varsC)]
- (-> (~@ (list/map (function [varC] (` (-> (~ varC) ..;JSON)))
+ (-> (~@ (list/map (function [varC] (` (-> (~ varC) //;JSON)))
varsC))
(-> ((~ (poly;to-ast *env* inputT)) (~@ varsC))
- ..;JSON)))
+ //;JSON)))
(function (~ funcC) [(~@ varsC)]
(~ bodyC))))))
poly;bound
@@ -200,17 +200,17 @@
(wrap (` (: (~ (@JSON//decode inputT))
<decoder>))))]
- [Unit poly;unit ..;null]
- [Bool poly;bool ..;boolean]
- [Nat poly;nat (p;codec ;;Codec<JSON,Nat> ..;any)]
- [Int poly;int (p;codec ;;Codec<JSON,Int> ..;any)]
- [Frac poly;frac ..;number]
- [Text poly;text ..;string])
+ [Unit poly;unit //;null]
+ [Bool poly;bool //;boolean]
+ [Nat poly;nat (p;codec ;;Codec<JSON,Nat> //;any)]
+ [Int poly;int (p;codec ;;Codec<JSON,Int> //;any)]
+ [Frac poly;frac //;number]
+ [Text poly;text //;string])
<time> (do-template [<type> <codec>]
[(do @
[_ (poly;this <type>)]
(wrap (` (: (~ (@JSON//decode inputT))
- (p;codec <codec> ..;string)))))]
+ (p;codec <codec> //;string)))))]
[du;Duration du;Codec<Text,Duration>]
[i;Instant i;Codec<Text,Instant>]
@@ -221,7 +221,7 @@
[*env* poly;env
#let [@JSON//decode (: (-> Type Code)
(function [type]
- (` (..;Reader (~ (poly;to-ast *env* type))))))]
+ (` (//;Reader (~ (poly;to-ast *env* type))))))]
inputT poly;peek]
($_ p;either
<basic>
@@ -230,37 +230,37 @@
[unitT (poly;apply (p;after (poly;this unit;Qty)
poly;any))]
(wrap (` (: (~ (@JSON//decode inputT))
- (p;codec (Codec<JSON,Qty> (:! (~ (poly;to-ast *env* unitT)) [])) ..;any)))))
+ (p;codec (Codec<JSON,Qty> (:! (~ (poly;to-ast *env* unitT)) [])) //;any)))))
(do @
[[_ _ valC] (poly;apply ($_ p;seq
(poly;this d;Dict)
poly;text
Codec<JSON,?>//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
- (..;object (~ valC))))))
+ (//;object (~ valC))))))
(do @
[[_ subC] (poly;apply (p;seq (poly;this ;Maybe)
Codec<JSON,?>//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
- (..;nullable (~ subC))))))
+ (//;nullable (~ subC))))))
(do @
[[_ subC] (poly;apply (p;seq (poly;this ;List)
Codec<JSON,?>//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
- (..;array (p;some (~ subC)))))))
+ (//;array (p;some (~ subC)))))))
(do @
[members (poly;variant (p;many Codec<JSON,?>//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
($_ p;alt
(~@ (list/map (function [[tag memberC]]
(` (|> (~ memberC)
- (p;after (..;number! (~ (code;frac (;;tag tag)))))
- ..;array)))
+ (p;after (//;number! (~ (code;frac (;;tag tag)))))
+ //;array)))
(list;enumerate members))))))))
(do @
[g!decoders (poly;tuple (p;many Codec<JSON,?>//decode))]
(wrap (` (: (~ (@JSON//decode inputT))
- (..;array ($_ p;seq (~@ g!decoders)))))))
+ (//;array ($_ p;seq (~@ g!decoders)))))))
## Type recursion
(do @
[[selfC bodyC] (poly;recursive Codec<JSON,?>//decode)]
@@ -276,8 +276,8 @@
(do @
[[funcC varsC bodyC] (poly;polymorphic Codec<JSON,?>//decode)]
(wrap (` (: (All [(~@ varsC)]
- (-> (~@ (list/map (|>. (~) ..;Reader (`)) varsC))
- (..;Reader ((~ (poly;to-ast *env* inputT)) (~@ varsC)))))
+ (-> (~@ (list/map (|>. (~) //;Reader (`)) varsC))
+ (//;Reader ((~ (poly;to-ast *env* inputT)) (~@ varsC)))))
(function (~ funcC) [(~@ varsC)]
(~ bodyC))))))
poly;bound
@@ -306,7 +306,7 @@
(derived: (Codec<JSON,?> Record)))}
(with-gensyms [g!inputs]
- (wrap (list (` (: (Codec ..;JSON (~ inputT))
+ (wrap (list (` (: (Codec //;JSON (~ inputT))
(struct (def: (~' encode) (Codec<JSON,?>//encode (~ inputT)))
- (def: ((~' decode) (~ g!inputs)) (..;run (~ g!inputs) (Codec<JSON,?>//decode (~ inputT))))
+ (def: ((~' decode) (~ g!inputs)) (//;run (~ g!inputs) (Codec<JSON,?>//decode (~ inputT))))
)))))))
diff --git a/stdlib/source/lux/macro/syntax.lux b/stdlib/source/lux/macro/syntax.lux
index 0f2777ed8..6424ff0fc 100644
--- a/stdlib/source/lux/macro/syntax.lux
+++ b/stdlib/source/lux/macro/syntax.lux
@@ -12,7 +12,7 @@
[product]
[maybe]
["E" error]))
- (.. [code "code/" Eq<Code>]))
+ (// [code "code/" Eq<Code>]))
## [Utils]
(def: (join-pairs pairs)
diff --git a/stdlib/source/lux/macro/syntax/common/reader.lux b/stdlib/source/lux/macro/syntax/common/reader.lux
index 9ab6d6381..7874e4d54 100644
--- a/stdlib/source/lux/macro/syntax/common/reader.lux
+++ b/stdlib/source/lux/macro/syntax/common/reader.lux
@@ -8,7 +8,7 @@
[maybe])
[macro]
(macro ["s" syntax #+ syntax: Syntax]))
- [.. #*])
+ [// #*])
## Exports
(def: #export export
@@ -119,18 +119,18 @@
definition-anns (s;local (list definition-anns)
(_definition-anns^ []))
#let [definition-args (find-definition-args definition-anns)]]
- (wrap {#..;definition-name definition-name
- #..;definition-type ?definition-type
- #..;definition-anns definition-anns
- #..;definition-value definition-value
- #..;definition-args definition-args}))))))
+ (wrap {#//;definition-name definition-name
+ #//;definition-type ?definition-type
+ #//;definition-anns definition-anns
+ #//;definition-value definition-value
+ #//;definition-args definition-args}))))))
(def: #export (typed-definition compiler)
{#;doc "A reader for definitions that ensures the input syntax is typed."}
(-> Compiler (Syntax Definition))
(do p;Monad<Parser>
[_definition (definition compiler)
- _ (case (get@ #..;definition-type _definition)
+ _ (case (get@ #//;definition-type _definition)
(#;Some _)
(wrap [])
diff --git a/stdlib/source/lux/macro/syntax/common/writer.lux b/stdlib/source/lux/macro/syntax/common/writer.lux
index 72e4a11eb..1a75e7309 100644
--- a/stdlib/source/lux/macro/syntax/common/writer.lux
+++ b/stdlib/source/lux/macro/syntax/common/writer.lux
@@ -3,7 +3,7 @@
(lux (data (coll [list "L/" Functor<List>])
[product])
(macro [code]))
- [.. #*])
+ [// #*])
## Exports
(def: #export (export ?el)
@@ -12,10 +12,10 @@
#;None
(list)
- (#;Some #..;Exported)
+ (#;Some #//;Exported)
(list (' #export))
- (#;Some #..;Hidden)
+ (#;Some #//;Hidden)
(list (' #hidden))))
## Annotations
diff --git a/stdlib/source/lux/math/logic/fuzzy.lux b/stdlib/source/lux/math/logic/fuzzy.lux
index 84e217d6b..6183293a8 100644
--- a/stdlib/source/lux/math/logic/fuzzy.lux
+++ b/stdlib/source/lux/math/logic/fuzzy.lux
@@ -5,7 +5,7 @@
[set])
text/format)
[math])
- (.. ["&" continuous]))
+ (// ["&" continuous]))
(type: #export (Fuzzy a)
(-> a Deg))
diff --git a/stdlib/source/lux/time/instant.lux b/stdlib/source/lux/time/instant.lux
index 2d4c1c58b..83b415024 100644
--- a/stdlib/source/lux/time/instant.lux
+++ b/stdlib/source/lux/time/instant.lux
@@ -15,7 +15,7 @@
(coll [list "L/" Fold<List> Functor<List>]
[sequence #+ Sequence sequence "sequence/" Functor<Sequence> Fold<Sequence>]))
(type opaque))
- (.. [duration "duration/" Order<Duration>]
+ (// [duration "duration/" Order<Duration>]
[date]))
(opaque: #export Instant
diff --git a/stdlib/source/lux/world/net/tcp.jvm.lux b/stdlib/source/lux/world/net/tcp.jvm.lux
index 4b111fcf7..0a109d04c 100644
--- a/stdlib/source/lux/world/net/tcp.jvm.lux
+++ b/stdlib/source/lux/world/net/tcp.jvm.lux
@@ -9,7 +9,7 @@
(world [blob #+ Blob])
[io]
[host])
- [..])
+ [//])
(host;import java.lang.AutoCloseable
(close [] #io #try void))
@@ -75,7 +75,7 @@
#out output}))))
(def: #export (client address port)
- (-> ..;Address ..;Port (T;Task TCP))
+ (-> //;Address //;Port (T;Task TCP))
(P;future
(do (e;ErrorT io;Monad<IO>)
[socket (Socket.new [address (nat-to-int port)])]
@@ -100,7 +100,7 @@
(wrap []))))
(def: #export (server port)
- (-> ..;Port (T;Task (frp;Channel TCP)))
+ (-> //;Port (T;Task (frp;Channel TCP)))
(P;future
(do (e;ErrorT io;Monad<IO>)
[server (ServerSocket.new [(nat-to-int port)])
diff --git a/stdlib/source/lux/world/net/udp.jvm.lux b/stdlib/source/lux/world/net/udp.jvm.lux
index a3124bdf2..139ed4f49 100644
--- a/stdlib/source/lux/world/net/udp.jvm.lux
+++ b/stdlib/source/lux/world/net/udp.jvm.lux
@@ -12,7 +12,7 @@
(world [blob #+ Blob])
[io]
[host])
- [..])
+ [//])
(host;import java.lang.AutoCloseable
(close [] #io #try void))
@@ -45,7 +45,7 @@
(exception: #export Multiple-Candidate-Addresses)
(def: (resolve address)
- (-> ..;Address (io;IO (e;Error InetAddress)))
+ (-> //;Address (io;IO (e;Error InetAddress)))
(do (e;ErrorT io;Monad<IO>)
[addresses (InetAddress.getAllByName [address])]
(: (io;IO (e;Error InetAddress))
@@ -58,7 +58,7 @@
{#socket DatagramSocket}
(def: #export (read data offset length self)
- (-> Blob Nat Nat UDP (T;Task [Nat ..;Address ..;Port]))
+ (-> Blob Nat Nat UDP (T;Task [Nat //;Address //;Port]))
(let [(^open) (@repr self)
packet (DatagramPacket.new|receive [data (nat-to-int offset) (nat-to-int length)])]
(P;future
@@ -70,7 +70,7 @@
(int-to-nat (DatagramPacket.getPort [] packet))])))))
(def: #export (write address port data offset length self)
- (-> ..;Address ..;Port Blob Nat Nat UDP (T;Task Unit))
+ (-> //;Address //;Port Blob Nat Nat UDP (T;Task Unit))
(P;future
(do (e;ErrorT io;Monad<IO>)
[address (resolve address)
@@ -92,7 +92,7 @@
(wrap (@opaque (#socket socket))))))
(def: #export (server port)
- (-> ..;Port (T;Task UDP))
+ (-> //;Port (T;Task UDP))
(P;future
(do (e;ErrorT io;Monad<IO>)
[socket (DatagramSocket.new|server [(nat-to-int port)])]