package ppx_core

  1. Overview
  2. Docs
  • deprecated [since 2017-01] Use Ppx_core or Ppx_core.Light instead
module Ast_builder = Ast_builder
module Ast_pattern = Ast_pattern
module Ast_traverse = Ast_traverse
module Attribute = Attribute
module Caller_id = Caller_id
module Context_free = Context_free
module Extension = Extension
module File_path = File_path
module Loc = Loc
module Merlin_helpers = Merlin_helpers
module Reserved_namespaces : sig ... end
module Spellcheck = Spellcheck
val lident : Ppx_core__.Import.String.t -> Longident.t
val gen_symbol : ?prefix:Ppx_core__.Import.String.t -> Ppx_core__.Import.Unit.t -> Ppx_core__.Import.String.t

gen_symbol ?prefix () generates a fresh variable name with prefix.

  • parameter prefix

    default = "_x"

val string_of_core_type : Migrate_parsetree.Ast_404.Parsetree.core_type -> Ppx_core__.Import.String.t
val assert_no_attributes : (string Location.loc * Migrate_parsetree.Ast_404.Parsetree.payload) list -> Ppx_core__.Import.Unit.t
val assert_no_attributes_in : Ast_traverse.iter
val get_type_param_name : (Migrate_parsetree.Ast_404.Parsetree.core_type * Migrate_parsetree.Ast_404.Asttypes.variance) -> Ppx_core__.Import.String.t Loc.t

get_tparam_id tp

  • returns

    the string identifier associated with tp if it is a type parameter.

(new type_is_recursive rec_flag tds)#go () returns whether rec_flag, tds is really a recursive type. We disregard recursive occurrences appearing in arrow types. You can override the search for certain type expressions by inheriting from this class.

really_recursive rec_flag tds = (new type_is_recursive rec_flag tds)#go ()

val loc_of_payload : (string Location.loc * Migrate_parsetree.Ast_404.Parsetree.payload) -> Location.t
val loc_of_attribute : (string Location.loc * Migrate_parsetree.Ast_404.Parsetree.payload) -> Location.t

convert multi-arg function applications into a cascade of 1-arg applications

val attribute_of_warning : Location.t -> Ppx_core__.Import.String.t -> string Location.loc * Migrate_parsetree.Ast_404.Parsetree.payload

Encode a warning message into an 'ocaml.ppwarning' attribute which can be inserted in a generated Parsetree. The compiler will be responsible for reporting the warning.

OCaml

Innovation. Community. Security.