cryptol-2.6.0: Cryptol: The Language of Cryptography

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

Cryptol.Eval.Env

Description

Synopsis

- data GenEvalEnv b w i = EvalEnv {
  - envVars :: !(Map Name (Eval (GenValue b w i)))
  - envTypes :: !TypeEnv
  }
- ppEnv :: BitWord b w i => PPOpts -> GenEvalEnv b w i -> Eval Doc
- emptyEnv :: GenEvalEnv b w i
- bindVar :: Name -> Eval (GenValue b w i) -> GenEvalEnv b w i -> Eval (GenEvalEnv b w i)
- bindVarDirect :: Name -> GenValue b w i -> GenEvalEnv b w i -> GenEvalEnv b w i
- lookupVar :: Name -> GenEvalEnv b w i -> Maybe (Eval (GenValue b w i))
- bindType :: TVar -> Either Nat' TValue -> GenEvalEnv b w i -> GenEvalEnv b w i
- lookupType :: TVar -> GenEvalEnv b w i -> Maybe (Either Nat' TValue)

# Documentation

data GenEvalEnv b w i Source #

Constructors

EvalEnv |

Fields

- envVars :: !(Map Name (Eval (GenValue b w i)))
- envTypes :: !TypeEnv

Instances

Generic (GenEvalEnv b w i) Source # |
Instance details Defined in Cryptol.Eval.Env Associated Types type Rep (GenEvalEnv b w i) :: Type -> Type Source # Methods from :: GenEvalEnv b w i -> Rep (GenEvalEnv b w i) x Source # to :: Rep (GenEvalEnv b w i) x -> GenEvalEnv b w i Source #
Semigroup (GenEvalEnv b w i) Source # |
Instance details Defined in Cryptol.Eval.Env Methods (<>) :: GenEvalEnv b w i -> GenEvalEnv b w i -> GenEvalEnv b w i Source # sconcat :: NonEmpty (GenEvalEnv b w i) -> GenEvalEnv b w i Source # stimes :: Integral b0 => b0 -> GenEvalEnv b w i -> GenEvalEnv b w i Source #
Monoid (GenEvalEnv b w i) Source # |
Instance details Defined in Cryptol.Eval.Env Methods mempty :: GenEvalEnv b w i Source # mappend :: GenEvalEnv b w i -> GenEvalEnv b w i -> GenEvalEnv b w i Source # mconcat :: [GenEvalEnv b w i] -> GenEvalEnv b w i Source #
(NFData b, NFData i, NFData w) => NFData (GenEvalEnv b w i) Source # |
Instance details Defined in Cryptol.Eval.Env Methods rnf :: GenEvalEnv b w i -> () Source #
type Rep (GenEvalEnv b w i) Source # |

Instance details

Defined in Cryptol.Eval.Env

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

ppEnv :: BitWord b w i => PPOpts -> GenEvalEnv b w i -> Eval Doc Source #

emptyEnv :: GenEvalEnv b w i Source #

Evaluation environment with no bindings

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

Bind a variable in the evaluation environment.

bindVarDirect :: Name -> GenValue b w i -> GenEvalEnv b w i -> GenEvalEnv b w i Source #

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

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

Lookup a variable in the environment.

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

Bind a type variable of kind *.

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

Lookup a type variable.