aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/data/collection/dictionary/ordered.lux')
-rw-r--r--stdlib/source/library/lux/data/collection/dictionary/ordered.lux26
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
index 3b4e7a17c..8d91b5cfb 100644
--- a/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/library/lux/data/collection/dictionary/ordered.lux
@@ -44,12 +44,12 @@
[black #Black]
)
-(type: #export (Dictionary k v)
+(type: .public (Dictionary k v)
{#.doc (doc "A dictionary data-structure with ordered entries.")}
{#&order (Order k)
#root (Maybe (Node k v))})
-(def: #export (empty order)
+(def: .public (empty order)
{#.doc (doc "An empty dictionary, employing the given order.")}
(All [k v] (-> (Order k) (Dictionary k v)))
{#&order order
@@ -57,7 +57,7 @@
## TODO: Doing inneficient access of Order functions due to compiler bug.
## TODO: Must improve it as soon as bug is fixed.
-(def: #export (get key dict)
+(def: .public (get key dict)
(All [k v] (-> k (Dictionary k v) (Maybe v)))
(let [## (^open "_\.") (get@ #&order dict)
]
@@ -82,7 +82,7 @@
## TODO: Doing inneficient access of Order functions due to compiler bug.
## TODO: Must improve it as soon as bug is fixed.
-(def: #export (key? dict key)
+(def: .public (key? dict key)
(All [k v] (-> (Dictionary k v) k Bit))
(let [## (^open "_\.") (get@ #&order dict)
]
@@ -101,7 +101,7 @@
(recur (get@ #right node)))))))))
(template [<name> <side>]
- [(def: #export (<name> dict)
+ [(def: .public (<name> dict)
{#.doc (doc (~~ (template.text ["Yields value under the " <name> "imum key."])))}
(All [k v] (-> (Dictionary k v) (Maybe v)))
(case (get@ #root dict)
@@ -121,7 +121,7 @@
[max #right]
)
-(def: #export (size dict)
+(def: .public (size dict)
(All [k v] (-> (Dictionary k v) Nat))
(loop [node (get@ #root dict)]
(case node
@@ -132,7 +132,7 @@
(inc (n.+ (recur (get@ #left node))
(recur (get@ #right node)))))))
-(def: #export empty?
+(def: .public empty?
(All [k v] (-> (Dictionary k v) Bit))
(|>> ..size (n.= 0)))
@@ -249,7 +249,7 @@
#Black
<default_behavior>))))
-(def: #export (put key value dict)
+(def: .public (put key value dict)
(All [k v] (-> k v (Dictionary k v) (Dictionary k v)))
(let [(^open "_\.") (get@ #&order dict)
root' (loop [?root (get@ #root dict)]
@@ -472,7 +472,7 @@
_
(undefined)))
-(def: #export (remove key dict)
+(def: .public (remove key dict)
(All [k v] (-> k (Dictionary k v) (Dictionary k v)))
(let [(^open "_\.") (get@ #&order dict)
[?root found?] (loop [?root (get@ #root dict)]
@@ -527,7 +527,7 @@
(set@ #root (#.Some (blackened root)) dict)
)))
-(def: #export (update key transform dict)
+(def: .public (update key transform dict)
(All [k v] (-> k (-> v v) (Dictionary k v) (Dictionary k v)))
(case (..get key dict)
(#.Some old)
@@ -536,7 +536,7 @@
#.None
dict))
-(def: #export (of_list order list)
+(def: .public (of_list order list)
(All [k v] (-> (Order k) (List [k v]) (Dictionary k v)))
(list\fold (function (_ [key value] dict)
(put key value dict))
@@ -544,7 +544,7 @@
list))
(template [<name> <type> <output>]
- [(def: #export (<name> dict)
+ [(def: .public (<name> dict)
(All [k v] (-> (Dictionary k v) (List <type>)))
(loop [node (get@ #root dict)]
(case node
@@ -562,7 +562,7 @@
[values v (get@ #value node')]
)
-(implementation: #export (equivalence (^open ",\."))
+(implementation: .public (equivalence (^open ",\."))
(All [k v] (-> (Equivalence v) (Equivalence (Dictionary k v))))
(def: (= reference sample)