To focus the search input from anywhere on the page, press the 'S' key.
in-package search v0.1.0
-
ppxlib
-
-
ppxlib.ast
-
-
ppxlib.astlib
-
-
ppxlib.metaquot
-
ppxlib.metaquot_lifters
-
ppxlib.print_diff
-
ppxlib.runner
-
ppxlib.runner_as_ppx
-
ppxlib.traverse
-
ppxlib.traverse_builtins
Library
Module
Module type
Parameter
Class
Class type
val get :
t ->
string ->
(Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) Ast_pattern.t ->
'b option
get cookies name pattern
look for a cookie named name
and parse it using pattern
. Raises if the parsing fails.
val get_res :
t ->
string ->
(Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) Ast_pattern.t ->
('b option, Location.Error.t Stdppx.NonEmptyList.t) result
get cookies name pattern
look for a cookie named name
and parse it using pattern
, returning a result
instead of raising when the parsing fails.
val set : t -> string -> Astlib.Ast_500.Parsetree.expression -> unit
set cookies name expr
set cookie name
to expr
.
val add_handler : (t -> unit) -> unit
Register a callback that is called before a rewriting. The handler is expected to lookup some cookies and set some global variables.
This API is a temporary hack to allow to migrate from add_arg
to the use of cookie, until ppxlib has been upgraded to pass cookies through.
val add_simple_handler :
string ->
(Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) Ast_pattern.t ->
f:('b option -> unit) ->
unit
Shorthand for: add_handler (fun t -> f (get t name pattern))
val add_post_handler : (t -> unit) -> unit
Register a callback that is called after a rewriting. The handler is expected to set some cookies from some global variables.