aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/name.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/data/name.lux13
1 files changed, 10 insertions, 3 deletions
diff --git a/stdlib/source/lux/data/name.lux b/stdlib/source/lux/data/name.lux
index 88eb25c99..897690144 100644
--- a/stdlib/source/lux/data/name.lux
+++ b/stdlib/source/lux/data/name.lux
@@ -20,20 +20,25 @@
[short short]
)
-(structure: #export equivalence (Equivalence Name)
+(structure: #export equivalence
+ (Equivalence Name)
+
(def: (= [xmodule xname] [ymodule yname])
(and (text@= xmodule ymodule)
(text@= xname yname))))
(structure: #export order
(Order Name)
+
(def: &equivalence ..equivalence)
(def: (< [moduleP shortP] [moduleS shortS])
(if (text@= moduleP moduleS)
(:: text.order < shortP shortS)
(:: text.order < moduleP moduleS))))
-(structure: #export codec (Codec Text Name)
+(structure: #export codec
+ (Codec Text Name)
+
(def: (encode [module short])
(case module
"" short
@@ -52,7 +57,9 @@
_
(#.Left (text@compose "Invalid format for Name: " input))))))
-(structure: #export hash (Hash Name)
+(structure: #export hash
+ (Hash Name)
+
(def: &equivalence ..equivalence)
(def: (hash [module name])