package ppx_tools_versioned

  1. Overview
  2. Docs

Provides abstraction over Asttypes.constant type

type t =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * string option
  4. | Pconst_float of string * char option
exception Unknown_literal of string * char
val of_constant : Ast_402.Asttypes.constant -> t

Converts Asttypes.constant to Constant.t

val to_constant : t -> Ast_402.Asttypes.constant

Converts Constant.t to Asttypes.constant. Raises Unknown_literal if conversion fails

OCaml

Innovation. Community. Security.