hevm-0.53.0: Symbolic EVM Evaluator
Safe HaskellSafe-Inferred
LanguageGHC2021

EVM.Effects

Description

This module contains custom app specific mtl style effects for hevm These are written in the style of the ReaderT over IO pattern [1]. Right now we only have a single ReadConfig effect, but over time hope to migrate most usages of IO into custom effects here.

This framework would allow us to have multiple interpretations for effects (e.g. a pure version for tests), but for now we interpret everything in IO only.

1
https://www.fpcomplete.com/blog/readert-design-pattern/

Documentation

class Monad m => ReadConfig m where Source #

Instances

Instances details
Monad m => ReadConfig (ReaderT Env m) Source # 
Instance details

Defined in EVM.Effects

data Config Source #

Instances

Instances details
Show Config Source # 
Instance details

Defined in EVM.Effects

Eq Config Source # 
Instance details

Defined in EVM.Effects

Methods

(==) :: Config -> Config -> Bool #

(/=) :: Config -> Config -> Bool #

class Monad m => TTY m where Source #

Methods

writeOutput :: Text -> m () Source #

writeErr :: Text -> m () Source #

Instances

Instances details
(Monad m, MonadIO m) => TTY (ReaderT Env m) Source # 
Instance details

Defined in EVM.Effects

writeTrace :: App m => VM t RealWorld -> m () Source #

newtype Env Source #

Constructors

Env 

Fields

Instances

Instances details
Monad m => ReadConfig (ReaderT Env m) Source # 
Instance details

Defined in EVM.Effects

(Monad m, MonadIO m) => TTY (ReaderT Env m) Source # 
Instance details

Defined in EVM.Effects

runEnv :: Env -> ReaderT Env m a -> m a Source #

type App m = (MonadUnliftIO m, ReadConfig m, TTY m) Source #

runApp :: ReaderT Env m a -> m a Source #