Up

Module Sexp_macro = Macro

Signature

type 'a conv = [
| `Result of 'a
| `Error of exn * Sexp.t
]
type 'a annot_conv = ([
| `Result of 'a
| `Error of exn * Sexp.Annotated.t
] as 'body) constraint 'body = 'a Sexp.Annotated.conv
val load_sexp : string -> Sexp.t

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

val load_sexps : string -> Sexp.t list

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

val load_sexp_conv : string -> (Sexp.t -> 'a) -> 'a annot_conv

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

val load_sexps_conv : string -> (Sexp.t -> 'a) -> 'a annot_conv list

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

val load_sexp_conv_exn : string -> (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 : string -> (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 expand_local_macros : Sexp.t list -> Sexp.t list conv

expand_local_macros sexps takes a list of sexps and performs macro-expansion on them, except that an error will be returned if an :include macro is found.

module type Sexp_loader = sig .. end
A version of load_sexps that is functorized with respect to the functions that load the sexps from files and the corresponding monad.
module Loader (S : Sexp_loader) : sig .. end
val add_error_location : string -> exn -> exn