cryptol-2.2.6: Cryptol: The Language of Cryptography

Copyright | (c) 2013-2015 Galois, Inc.
License | BSD3
Maintainer | cryptol@galois.com
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell98

Cryptol.Eval.Env

Description

Synopsis

- type ReadEnv = EvalEnv
- data EvalEnv = EvalEnv {
  - envVars :: Map QName Value
  - envTypes :: Map TVar TValue
  }
- emptyEnv :: EvalEnv
- bindVar :: QName -> Value -> EvalEnv -> EvalEnv
- lookupVar :: QName -> EvalEnv -> Maybe Value
- bindType :: TVar -> TValue -> EvalEnv -> EvalEnv
- lookupType :: TVar -> EvalEnv -> Maybe TValue

# Documentation

type ReadEnv = EvalEnv Source

data EvalEnv Source

Constructors

EvalEnv |

Fields

envVars :: Map QName Value
envTypes :: Map TVar TValue

Instances

Monoid EvalEnv Source |
PP (WithBase EvalEnv) Source |

emptyEnv :: EvalEnv Source

bindVar :: QName -> Value -> EvalEnv -> EvalEnv Source

Bind a variable in the evaluation environment.

lookupVar :: QName -> EvalEnv -> Maybe Value Source

Lookup a variable in the environment.

bindType :: TVar -> TValue -> EvalEnv -> EvalEnv Source

Bind a type variable of kind *.

lookupType :: TVar -> EvalEnv -> Maybe TValue Source

Lookup a type variable.