aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/data/format/json.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-09-19 21:52:42 -0400
committerEduardo Julian2017-09-19 21:52:42 -0400
commit70534ffd9c346ac23f9d5574b9c7820dccebc350 (patch)
treee2370a43a8bb2bdcb349d5bbbe477312859365f3 /stdlib/source/lux/data/format/json.lux
parente717f33e192a5969760c033c47f9c4709485dd76 (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.lux10
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'))))))