Beluga_parser.Makemodule Parser_state :
PARSER_STATE
with type token = Located_token.t
and type location = Beluga_syntax.Location.tmodule Disambiguation_state : DISAMBIGUATION_STATEmodule Parsing : sig ... endmodule Disambiguation : sig ... endinclude Support.State.STATErun a init runs a with initial state init, returning (final, v) where final is the final state and v is the output.
val traverse_list : ('a -> 'b t) -> 'a Support.List.t -> 'b Support.List.t tval traverse_list1 : ('a -> 'b t) -> 'a Support.List1.t -> 'b Support.List1.t tval traverse_list2 : ('a -> 'b t) -> 'a Support.List2.t -> 'b Support.List2.t tval traverse_list_void : ('a -> _ t) -> 'a Support.List.t -> Stdlib.Unit.t tval traverse_list1_void : ('a -> _ t) -> 'a Support.List1.t -> Stdlib.Unit.t tval traverse_list2_void : ('a -> _ t) -> 'a Support.List2.t -> Stdlib.Unit.t tval traverse_reverse_list :
('a -> 'b t) ->
'a Support.List.t ->
'b Support.List.t tval traverse_reverse_list1 :
('a -> 'b t) ->
'a Support.List1.t ->
'b Support.List1.t tval traverse_reverse_list2 :
('a -> 'b t) ->
'a Support.List2.t ->
'b Support.List2.t tval traverse_reverse_list_void :
('a -> _ t) ->
'a Support.List.t ->
Stdlib.Unit.t tval traverse_reverse_list1_void :
('a -> _ t) ->
'a Support.List1.t ->
Stdlib.Unit.t tval traverse_reverse_list2_void :
('a -> _ t) ->
'a Support.List2.t ->
Stdlib.Unit.t tval traverse_option :
('a -> 'b t) ->
'a Support.Option.t ->
'b Support.Option.t tval traverse_option_void :
('a -> _ t) ->
'a Support.Option.t ->
Stdlib.Unit.t tval seq_list : 'a t Support.List.t -> 'a Support.List.t tval seq_list1 : 'a t Support.List1.t -> 'a Support.List1.t tseq_list_void [x1; x2; ...; xn] performs x1, x2, ..., xn in order.
include Support.Monad.MONAD with type 'a t := 'a tval return : 'a -> 'a treturn a injects a into the monadic type.
bind f a is the sequential composition of two actions, passing any value produced by a as argument to f.
compose g f is the Kleisli composition of f and g, passing the input to f, then binding the output to g.
( let* ) ma f is bind f ma. This is a binding operator, and it is used as let* a = ma in f a.
include Support.Functor.FUNCTOR with type 'a t := 'a tmap f is the function that maps values of t by f. The order of arguments is for use in function pipelines as fb = fa |> map (fun a -> (* ... *)).
( let+ ) ma f is map f a. This is a binding operator, and is used as let+ a = ma in f a
include Support.Apply.APPLY with type 'a t := 'a tap fa fab applies argument fa to fab under the abstract datatype t.
ap_first second first combines actions first and second but keeps only first. That is, ap_first second first = first. The order of arguments is for use in function pipelines as first = first |> ap_first second.
ap_second second first combines actions first and second but keeps only second. That is, ap_second second first = second. The order of arguments is for use in function pipelines as second = first |> ap_second second.
seq2 fa1 fa2 sequentially executes actions fa1 and fa2, and keeps their outputs under the abstract datatype t.
seq3 fa1 fa2 fa3 sequentially executes actions fa1, fa2 and fa3, and keeps their outputs under the abstract datatype t.
seq4 fa1 fa2 fa3 fa4 sequentially executes actions fa1, fa2, fa3 and fa4, and keeps their outputs under the abstract datatype t.
seq5 fa1 fa2 fa3 fa4 fa5 sequentially executes actions fa1, fa2, fa3, fa4 and fa5, and keeps their outputs under the abstract datatype t.
lift2 f ma1 ma2 sequentially executes actions ma1, ma2 and passes their outputs to f.
lift3 f ma1 ma2 ma3 sequentially executes actions ma1, ma2, ma3 and passes their outputs to f.
lift4 f ma1 ma2 ma3 ma4 sequentially executes actions ma1, ma2, ma3, ma4 and passes their outputs to f.
val make_state :
parser_state:Parser_state.state ->
disambiguation_state:Disambiguation_state.state ->
stateval set_parser_state : Parser_state.state -> Stdlib.Unit.t tval get_parser_state : Parser_state.state tval set_disambiguation_state : Disambiguation_state.state -> Stdlib.Unit.t tval get_disambiguation_state : Disambiguation_state.state tval parse_and_disambiguate :
parser:'a Parsing.t ->
disambiguator:(Disambiguation.state -> 'a -> 'b) ->
'b t