aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/parser.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/control/parser.lux')
-rw-r--r--stdlib/source/library/lux/control/parser.lux72
1 files changed, 36 insertions, 36 deletions
diff --git a/stdlib/source/library/lux/control/parser.lux b/stdlib/source/library/lux/control/parser.lux
index 31fe9ad6a..99d4cd24e 100644
--- a/stdlib/source/library/lux/control/parser.lux
+++ b/stdlib/source/library/lux/control/parser.lux
@@ -19,54 +19,54 @@
(type: .public (Parser s a)
(-> s (Try [s a])))
-(implementation: .public functor
+(def: .public functor
(All (_ s) (Functor (Parser s)))
-
- (def: (each f ma)
- (function (_ input)
- (case (ma input)
- {try.#Failure msg}
- {try.#Failure msg}
+ (implementation
+ (def: (each f ma)
+ (function (_ input)
+ (case (ma input)
+ {try.#Failure msg}
+ {try.#Failure msg}
- {try.#Success [input' a]}
- {try.#Success [input' (f a)]}))))
+ {try.#Success [input' a]}
+ {try.#Success [input' (f a)]})))))
-(implementation: .public apply
+(def: .public apply
(All (_ s) (Apply (Parser s)))
-
- (def: functor ..functor)
+ (implementation
+ (def: functor ..functor)
- (def: (on fa ff)
- (function (_ input)
- (case (ff input)
- {try.#Success [input' f]}
- (case (fa input')
- {try.#Success [input'' a]}
- {try.#Success [input'' (f a)]}
+ (def: (on fa ff)
+ (function (_ input)
+ (case (ff input)
+ {try.#Success [input' f]}
+ (case (fa input')
+ {try.#Success [input'' a]}
+ {try.#Success [input'' (f a)]}
- {try.#Failure msg}
- {try.#Failure msg})
+ {try.#Failure msg}
+ {try.#Failure msg})
- {try.#Failure msg}
- {try.#Failure msg}))))
+ {try.#Failure msg}
+ {try.#Failure msg})))))
-(implementation: .public monad
+(def: .public monad
(All (_ s) (Monad (Parser s)))
-
- (def: functor ..functor)
+ (implementation
+ (def: functor ..functor)
- (def: (in x)
- (function (_ input)
- {try.#Success [input x]}))
+ (def: (in x)
+ (function (_ input)
+ {try.#Success [input x]}))
- (def: (conjoint mma)
- (function (_ input)
- (case (mma input)
- {try.#Failure msg}
- {try.#Failure msg}
+ (def: (conjoint mma)
+ (function (_ input)
+ (case (mma input)
+ {try.#Failure msg}
+ {try.#Failure msg}
- {try.#Success [input' ma]}
- (ma input')))))
+ {try.#Success [input' ma]}
+ (ma input'))))))
(def: .public (assertion message test)
(All (_ s) (-> Text Bit (Parser s Any)))