husk-scheme-3.5.3.1: R5RS Scheme interpreter, compiler, and library.

Portabilityportable
Stabilityexperimental
Maintainergithub.com/justinethier
Safe HaskellSafe-Infered

Language.Scheme.Variables

Description

This module contains code for working with Scheme variables.

Synopsis

Documentation

printEnv :: Env -> IO StringSource

Show the contents of an environment

copyEnv :: Env -> IO EnvSource

Create a deep copy of an environment

extendEnv :: Env -> [((String, String), LispVal)] -> IO EnvSource

Extend given environment by binding a series of values to a new environment.

isBound :: Env -> String -> IO BoolSource

Determine if a variable is bound in the default namespace

isRecBound :: Env -> String -> IO BoolSource

Determine if a variable is bound in the default namespace, in this env or a parent

isNamespacedBound :: Env -> String -> String -> IO BoolSource

Determine if a variable is bound in a given namespace

getVar :: Env -> String -> IOThrowsError LispValSource

Retrieve the value of a variable defined in the default namespace

getNamespacedVar :: Env -> String -> String -> IOThrowsError LispValSource

Retrieve the value of a variable defined in a given namespace

setVar, defineVar :: Env -> String -> LispVal -> IOThrowsError LispValSource

Bind a variable in the default namespace

Set a variable in the default namespace

setNamespacedVar :: Env -> String -> String -> LispVal -> IOThrowsError LispValSource

Set a variable in a given namespace

defineNamespacedVar :: Env -> String -> String -> LispVal -> IOThrowsError LispValSource

Bind a variable in the given namespace