package asak

  1. Overview
  2. Docs
val parsetree_of_string : string -> Parsetree.structure Monad_error.ErrS.t

If the string is a valid OCaml code, return its parsetree.

val init_env : unit -> Env.t

Initial typing envrionement, maybe with an other openened library.

Typecheck a parsetree with the initial environement.

val has_name : string -> Typedtree.value_binding -> bool

Check if a value_binding is a variable with the given name.

val get_specific_lambda_of_typedtree : string -> Typedtree.structure -> Lambda.lambda Monad_error.ErrS.t

Extract a specific let binding in a typedtree, and transform it into a lambda expression.

val find_let_in_parsetree_items : string -> Parsetree.structure -> Parsetree.structure_item option

Find a specific toplevel let-definition.

val read_structure_with_loc : ?prefix:string -> Typedtree.structure -> ((string * Location.t) * Lambda.lambda) list

Return all let bindings of a typedtree converted in lambda expression plus its location.

val read_structure : ?prefix:string -> Typedtree.structure -> (string * Lambda.lambda) list

Return all let bindings of a typedtree converted in lambda expressions.

val read_string : string -> (string * Lambda.lambda) list

Read a valid OCaml fragment and compile every toplevel definitions to Lambda.

val init_path : unit -> unit

An OCaml version-independent init_path

OCaml

Innovation. Community. Security.