package ppx_deriving_encoding
Ppx deriver for json-encoding
Install
Dune Dependency
Authors
Maintainers
Sources
ppx_deriving_encoding-0.4.1.tar.gz
md5=48a4f66b4a3e4017d99de8861013b1c6
sha512=c7cf2659ba8766bc5d89c119a87020271bce61409098fd88f9aac7c4cf5297ea697050a6510beb9a2414c4779900cd22b44efe710c3f6372d08ab2233229bd59
doc/ppx_deriving_encoding.lib/Ppx_deriving_encoding_lib/Utils/index.html
Module Ppx_deriving_encoding_lib.Utils
Source
Source
val enc_apply :
loc:Ppxlib.Location.t ->
string ->
Astlib.Ast_500.Parsetree.expression list ->
Astlib.Ast_500.Parsetree.expression
Source
val enc_apply0 :
loc:Ppxlib.Location.t ->
string ->
(Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression)
list ->
Astlib.Ast_500.Parsetree.expression
Source
val pexp_fun :
Astlib.Ast_500.Parsetree.pattern ->
Ppxlib.expression ->
Astlib.Ast_500.Parsetree.expression
Source
val add_params_fun_sig :
Astlib.Ast_500.Parsetree.core_type ->
Ppxlib.core_type list ->
Astlib.Ast_500.Parsetree.core_type
Source
val rm_prefix_of_expr :
Ppxlib.expression ->
[> `bool of bool | `length of int | `prefix of string ] option
Source
val get_rm_prefix_attr :
Ppxlib.payload ->
[> `bool of bool | `length of int | `prefix of string ] option
Source
type field_attributes = {
fa_field : string * bool * Ppxlib.expression option;
fa_key : string;
fa_title : Ppxlib.expression option;
fa_description : Ppxlib.expression option;
fa_assoc : bool option;
fa_enum : bool option;
fa_exclude : Ppxlib.expression option;
fa_obj : bool option;
fa_enc : Ppxlib.expression option;
fa_obj1 : string option;
fa_merge : bool;
fa_construct_default : bool;
fa_set : Ppxlib.expression option;
fa_map : Ppxlib.expression option option;
fa_schema : (Ppxlib.expression -> Ppxlib.expression) option;
}
Source
val transform_case :
?case:[< `camel | `cap | `kebab | `lower | `pascal | `snake | `upper ] ->
?typ:[< `cons | `variant cons ] ->
string ->
string
Source
val field_attrs :
key:string ->
?opt:bool ->
?option:string ->
?case:[< `camel | `cap | `kebab | `lower | `pascal | `snake | `upper ] ->
?set:Ppxlib.expression ->
?map:Ppxlib.expression option ->
?schema:(Ppxlib.expression -> Ppxlib.expression) ->
Ppxlib.attribute list ->
field_attributes
Source
type cs_attributes = {
cs_kind : string option;
cs_kind_label : string option;
cs_assoc : bool option;
cs_enum : bool option;
cs_transform : string -> string;
cs_obj : bool option;
cs_enc : Ppxlib.expression option;
cs_title : Ppxlib.expression option;
cs_description : Ppxlib.expression option;
cs_ignore : bool;
cs_rm_prefix : [ `bool of bool | `prefix of string | `length of int ];
cs_obj1 : string option;
cs_empty : bool option;
cs_case : Ppxlib.expression option;
cs_schema : (Ppxlib.expression -> Ppxlib.expression) option;
}
Source
val constructor_attrs :
?case:[< `camel | `cap | `kebab | `lower | `pascal | `snake | `upper ] ->
?typ:[< `cons | `variant cons ] ->
?kind:string option ->
Ppxlib.attribute list ->
cs_attributes
Source
type core_attributes = {
co_assoc : bool option;
co_enum : bool option;
co_exclude : Ppxlib.expression option;
co_obj : bool option;
co_enc : Ppxlib.expression option;
co_obj1 : string option;
co_merge : bool;
co_rm_prefix : [ `bool of bool | `prefix of string | `length of int ] option;
co_set : Ppxlib.expression option;
co_map : Ppxlib.expression option option;
co_opt : Ppxlib.expression option option;
co_schema : (Ppxlib.expression -> Ppxlib.expression) option;
}
Source
val core_attrs :
?assoc:bool ->
?enum:bool ->
?obj:bool ->
?enc:Ppxlib.expression ->
?obj1:string ->
?set:Ppxlib.expression ->
?map:Ppxlib.expression option ->
?schema:(Ppxlib.expression -> Ppxlib.expression) ->
Ppxlib.attribute list ->
core_attributes
Source
val simple_obj_tuple :
?v:string ->
?i:int ->
loc:'a ->
(loc:'a -> string -> 'b) ->
(loc:'a -> 'b list -> 'b) ->
'c list ->
'b
Source
val encaps_tuple :
?v:string ->
?i:int ->
loc:'a ->
(loc:'a -> string -> 'b) ->
(loc:'a -> 'b list -> 'b) ->
[< `merge of 'c | `obj of 'd list ] list ->
'b
Source
val simple_obj :
loc:Ppxlib.Location.t ->
kind:string ->
Astlib.Ast_500.Parsetree.expression list ->
Astlib.Ast_500.Parsetree.expression
Source
val encaps_merge :
loc:Ppxlib.Location.t ->
?kind:string ->
[< `merge of Astlib.Ast_500.Parsetree.expression
| `obj of Astlib.Ast_500.Parsetree.expression list ]
list ->
Astlib.Ast_500.Parsetree.expression
Source
val obj_expr :
loc:Ppxlib.Location.t ->
?kind:string ->
?v:string ->
(Astlib.Ast_500.Parsetree.expression * bool) list ->
Astlib.Ast_500.Parsetree.expression
Source
val remove_prefix_options :
string list ->
[> `bool of bool | `length of int | `prefix of string ] option ->
int
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>