package guile

  1. Overview
  2. Docs

Module GuileSource

Sourcetype scm

opaque type representing Guile scheme values.

Sourceval init_with : (unit -> unit) -> unit

init_with f calls f within a fresh Guile context.

Sourceval with_continuation_barrier : (unit -> unit) -> unit

with_continuation_barrier f runs the function f preventing any non-local control flow beyond the current calling context.

Sourceval init : unit -> unit

init () initialises the Guile context for the current thread of execution.

Sourceval shell : unit -> unit

shell () starts execution of a Guile repl.

Note: assumes Guile.init has been called.

Sourceval load : string -> scm

load filename loads the file at filename and evaluates it as a Guile scheme object.

Sourceval eol : scm

eol represents an empty list in Guile.

Sourceval undefined : scm

undefined represents a nullary value in Guile, can be passed in as none values to functions with optional arguments.

Sourceval (=) : scm -> scm -> bool

(=) x y tests for equality between two Guile entities.

Sourcemodule Bool : sig ... end
Sourcemodule Number : sig ... end
Sourcemodule Pair : sig ... end
Sourcemodule List : sig ... end
Sourcemodule Char : sig ... end
Sourcemodule String : sig ... end
Sourcemodule Symbol : sig ... end
Sourcemodule Error : sig ... end
Sourcemodule Functions : sig ... end
Sourceval eval : ?state:scm -> scm -> scm

eval ?state s evaluates a Guile scheme s-expression s in execution state state.

Sourceval eval_string : string -> scm

eval_string s evaluates a string s as a Guile scheme s-expression

Sourceval to_string : ?printer:scm -> scm -> string

to_string ?printer v returns a string representation of a Guile scheme value v.

Sourcemodule Sexp : sig ... end
Sourcemodule Module : sig ... end
OCaml

Innovation. Community. Security.