Module

Lambs.Define

Package
purescript-lambs
Repository
Glorp/purescript-lambs

#Define Source

data Define

A toplevel definition. Has:

  1. name that can be used
  2. Term that can be substituted for name

Constructors

Instances

#Undefine Source

data Undefine

For removing a toplevel definition.

Constructors

Instances

#Definitions Source

data Definitions

List of toplevel definitions.

Instances

#substDefs Source

substDefs :: Definitions -> Term -> Term

Given

  1. some Definitions
  2. a Term

this should return a new Term where the Defines in the Definitions are substituted for the correspinging free variables in the original Term.

#noDefinitions Source

noDefinitions :: Definitions

Empty list of toplevel definitions.

#addDef Source

addDef :: Define -> Definitions -> Definitions

For adding a definition.

#removeDef Source

removeDef :: Undefine -> Definitions -> Definitions

For taking away a definition.

#definitionsList Source

definitionsList :: Definitions -> List Define

For getting the list of Defines contained in a Definitions