diff options
author | Eduardo Julian | 2020-12-17 22:03:54 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-12-17 22:03:54 -0400 |
commit | 68b1dd82f23d6648ac3d9075a8f84b0174392945 (patch) | |
tree | 2db148a005c21552947d96dfd4e788ba21705037 /stdlib/source/program/aedifex/artifact | |
parent | abc5c5293603229b447b8b5dfa7f3275571ad982 (diff) |
More optimizations to the Lux syntax parser.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/artifact.lux | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/stdlib/source/program/aedifex/artifact.lux b/stdlib/source/program/aedifex/artifact.lux index a26e70e50..e4fe812f1 100644 --- a/stdlib/source/program/aedifex/artifact.lux +++ b/stdlib/source/program/aedifex/artifact.lux @@ -2,8 +2,9 @@ [lux (#- Name) [abstract [equivalence (#+ Equivalence)] - ["." hash (#+ Hash)]] + [hash (#+ Hash)]] [data + ["." product] ["." text ["%" format (#+ Format)]] [collection @@ -29,7 +30,7 @@ (def: #export hash (Hash Artifact) - ($_ hash.product + ($_ product.hash text.hash text.hash text.hash @@ -61,12 +62,15 @@ ..identity-separator (..identity value))) +(def: #export (directory separator group) + (-> Text Group Text) + (|> group + (text.split-all-with ..group-separator) + (text.join-with separator))) + (def: (address separator artifact) (-> Text Artifact Text) - (let [directory (%.format (|> artifact - (get@ #group) - (text.split-all-with ..group-separator) - (text.join-with separator)) + (let [directory (%.format (..directory separator (get@ #group artifact)) separator (get@ #name artifact) separator |