cryptol-2.11.0: Cryptol: The Language of Cryptography
Copyright(c) 2013-2020 Galois Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Cryptol.Eval.Reference

Description

 
Synopsis

Documentation

data Value Source #

Value type for the reference evaluator.

Constructors

VBit !Bool

Bit booleans

VInteger !Integer

Integer or Z n integers

VRational !Rational

Rational rationals

VFloat !BF

Floating point numbers

VList Nat' [E Value]

[n]a finite or infinite lists

VTuple [E Value]

( .. ) tuples

VRecord [(Ident, E Value)]

{ .. } records

VFun (E Value -> E Value)

functions

VPoly (TValue -> E Value)

polymorphic values (kind *)

VNumPoly (Nat' -> E Value)

polymorphic values (kind #)

data E a Source #

Computation monad for the reference evaluator.

Constructors

Value !a 
Err EvalError 

Instances

Instances details
Monad E Source # 
Instance details

Defined in Cryptol.Eval.Reference

Methods

(>>=) :: E a -> (a -> E b) -> E b #

(>>) :: E a -> E b -> E b #

return :: a -> E a #

Functor E Source # 
Instance details

Defined in Cryptol.Eval.Reference

Methods

fmap :: (a -> b) -> E a -> E b #

(<$) :: a -> E b -> E a #

Applicative E Source # 
Instance details

Defined in Cryptol.Eval.Reference

Methods

pure :: a -> E a #

(<*>) :: E (a -> b) -> E a -> E b #

liftA2 :: (a -> b -> c) -> E a -> E b -> E c #

(*>) :: E a -> E b -> E b #

(<*) :: E a -> E b -> E a #

evalExpr Source #

Arguments

:: Env

Evaluation environment

-> Expr

Expression to evaluate

-> E Value 

evalDeclGroup :: Env -> DeclGroup -> Env Source #