package polymarket
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
OCaml client library for the Polymarket prediction market API
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.2.0.tar.gz
md5=4eb4c5d2f63ff081c9713d90be5a51b2
sha512=0e3de0c9b40683e09ab8f9f966a44784ef1b9b482c3eefef84104a7e8042c92f1d79893ee9588b24fa3d0decaed7f365509f4d1c23c66ce8328efb64e721f276
doc/ppx_polymarket_enum/Ppx_polymarket_enum/index.html
Module Ppx_polymarket_enumSource
PPX deriver for enum types with string conversion.
Generates the full enum interface inline without any runtime dependencies.
Usage:
type t = Foo | Bar | Baz [@@deriving enum]Generates UPPERCASE strings by default (Foo -> "FOO"). Case-insensitive parsing is enabled by default.
For custom string mappings, use @value:
type t = Min_1 [@value "1m"] | Hour_1 [@value "1h"] [@@deriving enum]Generated functions:
- to_string : t -> string
- of_string : string -> t
- of_string_opt : string -> t option
- t_of_yojson : Yojson.Safe.t -> t
- yojson_of_t : t -> Yojson.Safe.t
- pp : Format.formatter -> t -> unit
- equal : t -> t -> bool
Extract custom value from @value "..." attribute on a constructor
Convert constructor name to UPPERCASE string (default convention)
Source
val generate_to_string :
loc:Ppxlib__.Import.location ->
(string * Ppxlib.attribute list * 'a) list ->
Ppxlib_ast.Ast.expressionGenerate the to_string function as a pattern match
Source
val generate_of_string_opt :
loc:Ppxlib.location ->
(string * Ppxlib.attribute list * 'a) list ->
Ppxlib_ast.Ast.expressionGenerate the of_string_opt function with case-insensitive matching
Source
val generate_impl :
ctxt:Ppxlib.Expansion_context.Deriver.t ->
('a * Ppxlib.type_declaration list) ->
Ppxlib_ast.Ast.structure_item listMain structure generator for the deriver
Source
val impl_generator :
(Ppxlib_ast.Ast.structure_item list,
Ppxlib__.Import.rec_flag * Ppxlib.type_declaration list)
Ppxlib__Deriving.Generator.tRegister the deriver
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>