Skip to content

Commit

Permalink
Add angstrom letops
Browse files Browse the repository at this point in the history
  • Loading branch information
drewolson committed Oct 25, 2023
1 parent 336101b commit f9c8941
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/util/parser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ module A = Angstrom
module Syntax = struct
module Let_syntax = A.Let_syntax.Let_syntax

let ( let+ ) = A.( let+ )
let ( and+ ) = A.( and+ )
let ( let* ) = A.( let* )

let ( >>| ), ( *> ), ( <* ), ( <|> ), ( <$> ) =
A.(( >>| ), ( *> ), ( <* ), ( <|> ), ( <$> ))
;;
Expand Down
3 changes: 3 additions & 0 deletions lib/util/parser.mli
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module Syntax : sig
include module type of A.Let_syntax.Let_syntax
end

val ( let+ ) : 'a A.t -> ('a -> 'b) -> 'b A.t
val ( and+ ) : 'a A.t -> 'b A.t -> ('a * 'b) A.t
val ( let* ) : 'a A.t -> ('a -> 'b A.t) -> 'b A.t
val ( *> ) : 'a A.t -> 'b A.t -> 'b A.t
val ( <* ) : 'a A.t -> 'b A.t -> 'a A.t
val ( >>| ) : 'a A.t -> ('a -> 'b) -> 'b A.t
Expand Down

0 comments on commit f9c8941

Please sign in to comment.