diff options
author | Eduardo Julian | 2021-06-30 23:24:55 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-06-30 23:24:55 -0400 |
commit | 744ee69630de59ca3ba660b0aab6361cd17ce1b4 (patch) | |
tree | 329c11b8c3522c319c99ebd4d7c51ee0e7464bae /stdlib/source/poly | |
parent | 6633cd42f2892ea71530ddeeb93a7e7c0b59faa3 (diff) |
"signature:" -> "interface:" & "structure:" -> "implementation:"
"signature" & "structure" feel like very ML-specific terminology and might not be easy on programmers unfamiliar with it.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/poly/lux/abstract/functor.lux | 5 | ||||
-rw-r--r-- | stdlib/source/poly/lux/data/format/json.lux | 17 |
2 files changed, 12 insertions, 10 deletions
diff --git a/stdlib/source/poly/lux/abstract/functor.lux b/stdlib/source/poly/lux/abstract/functor.lux index 66ea54f50..1ef5c4137 100644 --- a/stdlib/source/poly/lux/abstract/functor.lux +++ b/stdlib/source/poly/lux/abstract/functor.lux @@ -104,5 +104,6 @@ (Arg<?> inputC)) (p.fail (format "Cannot create Functor for: " (%.type inputT)))))] (wrap (` (: (~ (@Functor inputT)) - (structure (def: ((~' map) (~ funcC) (~ inputC)) - (~ outputC)))))))) + (implementation + (def: ((~' map) (~ funcC) (~ inputC)) + (~ outputC)))))))) diff --git a/stdlib/source/poly/lux/data/format/json.lux b/stdlib/source/poly/lux/data/format/json.lux index 1efbf39a8..cf3076f72 100644 --- a/stdlib/source/poly/lux/data/format/json.lux +++ b/stdlib/source/poly/lux/data/format/json.lux @@ -56,7 +56,7 @@ (def: low_mask Nat (|> 1 (i64.left_shift 32) dec)) (def: high_mask Nat (|> low_mask (i64.left_shift 32))) -(structure: nat_codec +(implementation: nat_codec (codec.Codec JSON Nat) (def: (encode input) @@ -72,7 +72,7 @@ (wrap (n.+ (|> high frac.int .nat (i64.left_shift 32)) (|> low frac.int .nat)))))))) -(structure: int_codec +(implementation: int_codec (codec.Codec JSON Int) (def: encode (|>> .nat (\ nat_codec encode))) @@ -87,7 +87,7 @@ #.None #/.Null (#.Some value) (writer value)))) -(structure: qty_codec +(implementation: qty_codec (All [unit] (codec.Codec JSON (unit.Qty unit))) @@ -343,8 +343,9 @@ (derived: (..codec Record)))} (wrap (list (` (: (codec.Codec /.JSON (~ inputT)) - (structure (def: (~' encode) - ((~! ..encode) (~ inputT))) - (def: (~' decode) - ((~! </>.run) ((~! ..decode) (~ inputT)))) - )))))) + (implementation + (def: (~' encode) + ((~! ..encode) (~ inputT))) + (def: (~' decode) + ((~! </>.run) ((~! ..decode) (~ inputT)))) + )))))) |