From 744ee69630de59ca3ba660b0aab6361cd17ce1b4 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 30 Jun 2021 23:24:55 -0400 Subject: "signature:" -> "interface:" & "structure:" -> "implementation:" "signature" & "structure" feel like very ML-specific terminology and might not be easy on programmers unfamiliar with it.--- stdlib/source/poly/lux/abstract/functor.lux | 5 +++-- stdlib/source/poly/lux/data/format/json.lux | 17 +++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'stdlib/source/poly') 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)))) + )))))) -- cgit v1.2.3