diff options
author | Eduardo Julian | 2020-05-05 00:47:58 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-05-05 00:47:58 -0400 |
commit | 724372e2b023bccbb93e1fa40e3c92ed2ee7e36c (patch) | |
tree | b15130eb6e8fea2f4d1586085524517d92af0b4b /stdlib/source/lux/data/name.lux | |
parent | a419ec66895e07fbb54ecc59f92e154126a10ac5 (diff) |
Fixed bugs while parsing modules' cached data.
Diffstat (limited to 'stdlib/source/lux/data/name.lux')
-rw-r--r-- | stdlib/source/lux/data/name.lux | 13 |
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]) |