package guile

  1. Overview
  2. Docs
val resolve : string -> scm

resolve name finds the module named name and returns it. When it has not already been defined, try to auto-load it. When it can’t be found that way either, create an empty module.

val with_current_module : modl:scm -> (unit -> unit) -> unit

with_current_module ~modl f calls f and makes module modl the current module during the call.

val lookup_variable : modl:string -> string -> scm

lookup_variable ~modl name finds the variable bound to the symbol name in the public interface of the module modl.

modl should be a space separated string of module names

val lookup : modl:string -> string -> scm

lookup ~modl name finds value of the variable bound to the symbol name in the public interface of the module modl.

Throws a Guile exception if not found.

modl should be a space separated string of module names

val is_defined : ?modl:scm -> string -> bool

is_defined ~modl name returns true if name is defined in the module modl or the current module when module is not specified; otherwise return false.

val define_module : string -> (unit -> unit) -> scm

define_module modl f defines a new module named modl and makes it current while f is called. Returns the module modl.

val define : string -> scm -> unit

define name vl binds the symbol indicated by name to a variable in the current module and set that variable to vl. When name is already bound to a variable, update that. Else create a new variable.

val use : string -> scm

use modl add the module modl to the uses list of the current module.

val export : string -> unit

export name adds the bindings designated by name to the public interface of the current module.

OCaml

Innovation. Community. Security.