diff options
author | Eduardo Julian | 2017-09-19 21:52:42 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-09-19 21:52:42 -0400 |
commit | 70534ffd9c346ac23f9d5574b9c7820dccebc350 (patch) | |
tree | e2370a43a8bb2bdcb349d5bbbe477312859365f3 /stdlib/source/lux/data/format/json.lux | |
parent | e717f33e192a5969760c033c47f9c4709485dd76 (diff) |
- Some refactoring.
- Moved "assume" and "default" to lux/data/maybe.
Diffstat (limited to 'stdlib/source/lux/data/format/json.lux')
-rw-r--r-- | stdlib/source/lux/data/format/json.lux | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/stdlib/source/lux/data/format/json.lux b/stdlib/source/lux/data/format/json.lux index 097525b1d..95d689059 100644 --- a/stdlib/source/lux/data/format/json.lux +++ b/stdlib/source/lux/data/format/json.lux @@ -2,9 +2,7 @@ For more information, please see: http://www.json.org/"} lux - (lux (control functor - applicative - [monad #+ do Monad] + (lux (control [monad #+ do Monad] [eq #+ Eq] codec ["p" parser "p/" Monad<Parser>]) @@ -12,7 +10,7 @@ [text "text/" Eq<Text> Monoid<Text>] (text ["l" lexer]) [number "frac/" Codec<Text,Frac> "nat/" Codec<Text,Nat>] - maybe + [maybe] ["R" result] [sum] [product] @@ -169,8 +167,8 @@ (and (n.= (vector;size xs) (vector;size ys)) (L/fold (function [idx prev] (and prev - (default false - (do Monad<Maybe> + (maybe;default false + (do maybe;Monad<Maybe> [x' (vector;nth idx xs) y' (vector;nth idx ys)] (wrap (= x' y')))))) |