cryptol-2.5.0: Cryptol: The Language of Cryptography

Copyright(c) 2013-2016 Galois Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

Cryptol.Eval.Env

Description

 

Synopsis

Documentation

data GenEvalEnv b w Source #

Constructors

EvalEnv 

Fields

Instances

Generic (GenEvalEnv b w) Source # 

Associated Types

type Rep (GenEvalEnv b w) :: * -> * #

Methods

from :: GenEvalEnv b w -> Rep (GenEvalEnv b w) x #

to :: Rep (GenEvalEnv b w) x -> GenEvalEnv b w #

Monoid (GenEvalEnv b w) Source # 

Methods

mempty :: GenEvalEnv b w #

mappend :: GenEvalEnv b w -> GenEvalEnv b w -> GenEvalEnv b w #

mconcat :: [GenEvalEnv b w] -> GenEvalEnv b w #

(NFData b, NFData w) => NFData (GenEvalEnv b w) Source # 

Methods

rnf :: GenEvalEnv b w -> () #

type Rep (GenEvalEnv b w) Source # 
type Rep (GenEvalEnv b w) = D1 (MetaData "GenEvalEnv" "Cryptol.Eval.Env" "cryptol-2.5.0-62ntwDPh16AFY461fF3rK" False) (C1 (MetaCons "EvalEnv" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "envVars") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Map Name (Eval (GenValue b w))))) (S1 (MetaSel (Just Symbol "envTypes") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 TypeEnv))))

emptyEnv :: GenEvalEnv b w Source #

Evaluation environment with no bindings

bindVar :: Name -> Eval (GenValue b w) -> GenEvalEnv b w -> Eval (GenEvalEnv b w) Source #

Bind a variable in the evaluation environment.

bindVarDirect :: Name -> GenValue b w -> GenEvalEnv b w -> Eval (GenEvalEnv b w) Source #

Bind a variable to a value in the evaluation environment, without creating a thunk.

lookupVar :: Name -> GenEvalEnv b w -> Maybe (Eval (GenValue b w)) Source #

Lookup a variable in the environment.

bindType :: TVar -> Either Nat' TValue -> GenEvalEnv b w -> GenEvalEnv b w Source #

Bind a type variable of kind *.

lookupType :: TVar -> GenEvalEnv b w -> Maybe (Either Nat' TValue) Source #

Lookup a type variable.