libriscv-0.1.0.0: A versatile, flexible and executable formal model for the RISC-V architecture.
Safe HaskellSafe-Inferred
LanguageHaskell2010

LibRISCV.Effects.Expressions.Language

Description

Implements an effect for evaluation of the Expr abstraction.

Synopsis

Documentation

data ExprEval v r where Source #

Constructors

IsTrue :: Expr v -> ExprEval v Bool 
IsFalse :: Expr v -> ExprEval v Bool 
Eval :: Expr v -> ExprEval v v 

eval :: forall v. forall effs. Member (ExprEval v) effs => Expr v -> Eff effs v Source #

defaultEval :: MonadIO m => (v -> Bool, Expr v -> v) -> ExprEval v ~> m Source #

ifExprM :: forall v r v'. Member (ExprEval v) r => Expr v -> Eff r v' -> Eff r v' -> Eff r v' Source #

Like ifM but with internal expression evaluation.

whenExprM :: forall v r. Member (ExprEval v) r => Expr v -> Eff r () -> Eff r () Source #

Like whenM but with internal expression evaluation.

unlessExprM :: forall v r. Member (ExprEval v) r => Expr v -> Eff r () -> Eff r () Source #

Like unlessM but with internal expression evaluation.