LicenseGPL-3
Safe HaskellSafe

Environment

Contents

Description

This module contains all the auxiliary logic necessary to represent the internal state of the interpreter.

Synopsis

Environment

context :: Environment -> Context Source #

defaultEnv :: Environment Source #

Default environment for the interpreter.

emptyContext :: Context Source #

Empty context without any bindings

Reading the environment

getVerbose :: Environment -> Bool Source #

Get current settings

getColor :: Environment -> Bool Source #

Get current settings

getSki :: Environment -> Bool Source #

Get current settings

getTypes :: Environment -> Bool Source #

Get current settings

getExpressionName :: Environment -> Exp -> Maybe String Source #

Given an expression, returns its name if it is bounded to any.

getTopo :: Environment -> Bool Source #

Get current settings

Modifying the environment

addBind :: Environment -> String -> Exp -> Environment Source #

Adds a name binding to the environment

changeColor :: Environment -> Bool -> Environment Source #

Sets the color configuration on/off

changeVerbose :: Environment -> Bool -> Environment Source #

Sets the verbose configuration on/off.

changeSkioutput :: Environment -> Bool -> Environment Source #

Sets the ski output configuration on/off

changeTypes :: Environment -> Bool -> Environment Source #

Sets the types output configuration on/off

Filenames and Modulenames

type Filename = String Source #

A filename is a string containing the directory path and the real name of the file.

type Modulename = String Source #

A modulename is a string naming a module.