diff options
author | Eduardo Julian | 2022-12-02 19:33:00 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-12-02 19:33:00 -0400 |
commit | 94e5802f594a73245fce0fbd885103b8bf210d57 (patch) | |
tree | 65e5799c0be40f5f015b39bfa6c87c9c27fd9424 /stdlib/source/polytypic | |
parent | b491dfff00219d5206075ea65468e00ab657075d (diff) |
Added some simple time-series handling machinery.
Diffstat (limited to 'stdlib/source/polytypic')
-rw-r--r-- | stdlib/source/polytypic/lux/abstract/equivalence.lux | 4 | ||||
-rw-r--r-- | stdlib/source/polytypic/lux/data/format/json.lux | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/polytypic/lux/abstract/equivalence.lux b/stdlib/source/polytypic/lux/abstract/equivalence.lux index a79fd9c2a..1b845ae8e 100644 --- a/stdlib/source/polytypic/lux/abstract/equivalence.lux +++ b/stdlib/source/polytypic/lux/abstract/equivalence.lux @@ -164,6 +164,6 @@ <type>.recursive_call ... If all else fails... (|> <type>.any - (at ! each (|>> %.type (format "Cannot create Equivalence for: ") <>.failure)) - (at ! conjoint)) + (of ! each (|>> %.type (format "Cannot create Equivalence for: ") <>.failure)) + (of ! conjoint)) ))))) diff --git a/stdlib/source/polytypic/lux/data/format/json.lux b/stdlib/source/polytypic/lux/data/format/json.lux index 333f0c323..9d2639e25 100644 --- a/stdlib/source/polytypic/lux/data/format/json.lux +++ b/stdlib/source/polytypic/lux/data/format/json.lux @@ -77,9 +77,9 @@ (codec.Codec JSON Int) (implementation (def encoded - (|>> .nat (at nat_codec encoded))) + (|>> .nat (of nat_codec encoded))) (def decoded - (|>> (at nat_codec decoded) (at try.functor each (|>> .int)))))) + (|>> (of nat_codec decoded) (of try.functor each (|>> .int)))))) ... Builds a JSON generator for potentially inexistent values. (def .public (nullable format) @@ -95,10 +95,10 @@ (implementation (def encoded (|>> unit.number - (at ..int_codec encoded))) + (of ..int_codec encoded))) (def decoded - (|>> (at ..int_codec decoded) - (at try.functor each unit.measure))))) + (|>> (of ..int_codec decoded) + (of try.functor each unit.measure))))) (def encoded (polytypic encoded @@ -112,15 +112,15 @@ [(<type>.exactly Any) (function ((, g!_) (, (code.symbol ["" "0"]))) {/.#Null})] [(<type>.sub Bit) (|>> {/.#Boolean})] - [(<type>.sub Nat) (at ..nat_codec (,' encoded))] - [(<type>.sub Int) (at ..int_codec (,' encoded))] + [(<type>.sub Nat) (of ..nat_codec (,' encoded))] + [(<type>.sub Int) (of ..int_codec (,' encoded))] [(<type>.sub Frac) (|>> {/.#Number})] [(<type>.sub Text) (|>> {/.#String})]) <time> (with_template [<type> <codec>] [(do ! [_ (<type>.exactly <type>)] (in (` (is (, (@JSON#encoded inputT)) - (|>> (at <codec> (,' encoded)) {/.#String})))))] + (|>> (of <codec> (,' encoded)) {/.#String})))))] ... [duration.Duration duration.codec] ... [instant.Instant instant.codec] @@ -141,7 +141,7 @@ [unitT (<type>.applied (<>.after (<type>.exactly unit.Measure) <type>.any))] (in (` (is (, (@JSON#encoded inputT)) - (at measure_codec (,' encoded)))))) + (of measure_codec (,' encoded)))))) (do ! [.let [g!_ (code.local "_______") g!key (code.local "_______key") @@ -152,7 +152,7 @@ encoded))] (in (` (is (, (@JSON#encoded inputT)) (|>> (dictionary.entries) - (at list.functor (,' each) (function ((, g!_) [(, g!key) (, g!val)]) + (of list.functor (,' each) (function ((, g!_) [(, g!key) (, g!val)]) [(, g!key) ((, =val=) (, g!val))])) (dictionary.of_list text.hash) {/.#Object}))))) @@ -167,7 +167,7 @@ (<type>.exactly .List) encoded))] (in (` (is (, (@JSON#encoded inputT)) - (|>> (at list.functor (,' each) (, =sub=)) sequence.of_list {/.#Array}))))) + (|>> (of list.functor (,' each) (, =sub=)) sequence.of_list {/.#Array}))))) (do ! [.let [g!_ (code.local "_______") g!input (code.local "_______input")] |