package sexp_macro

  1. Overview
  2. Docs

The load... functions of this module mirror the corresponding functions of the Sexp module except that they do macro-expansion in the loaded file and may throw additional exceptions.

val load_sexp : ?allow_includes:bool -> string -> Core.Sexp.t

load_sexp file like {!Sexp.load_sexp} file, but resolves the macros contained in file.

If allow_includes is false then this raises an exception if file contains any :include macros. The default is true.

val load_sexps : ?allow_includes:bool -> string -> Core.Sexp.t list

load_sexps file like {!Sexp.load_sexps} file, but resolves the macros contained in file.

If allow_includes is false then this raises an exception if file contains any :include macros. The default is true.

val load_sexp_conv : ?allow_includes:bool -> string -> (Core.Sexp.t -> 'a) -> 'a Core.Or_error.t

load_sexp_conv file f uses load_sexp and converts the result using f.

load_sexps_conv file f uses load_sexps and converts the result using f.

val load_sexps_conv : ?allow_includes:bool -> string -> (Core.Sexp.t -> 'a) -> 'a list Core.Or_error.t
val load_sexp_conv_exn : ?allow_includes:bool -> string -> (Core.Sexp.t -> 'a) -> 'a

load_sexp_conv_exn file f like load_sexp_conv, but raises an exception in case of conversion error.

val load_sexps_conv_exn : ?allow_includes:bool -> string -> (Core.Sexp.t -> 'a) -> 'a list

load_sexps_conv_exn file f like load_sexps_conv, but raises an exception in case of conversion error.

val included_files : string -> string list

included_files returns the names of all files that will be loaded as result of macro expansion. This includes the file itself.

OCaml

Innovation. Community. Security.