quickcheck-state-machine-0.3.0: Test monadic programs using state machine based models

Copyright(C) 2017 Jacob Stanley
LicenseBSD-style (see the file LICENSE)
MaintainerStevan Andjelkovic <stevan@advancedtelematic.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Test.StateMachine.Internal.Types.Environment

Description

This module contains environments that are used to translate between symbolic and concrete references. It's taken verbatim from the Hedgehog library.

Synopsis

Documentation

newtype Environment Source #

A mapping of symbolic values to concrete values.

Constructors

Environment 

emptyEnvironment :: Environment Source #

Create an empty environment.

insertConcrete :: Symbolic a -> Concrete a -> Environment -> Environment Source #

Insert a symbolic / concrete pairing in to the environment.

reifyDynamic :: forall a. Typeable a => Dynamic -> Either EnvironmentError (Concrete a) Source #

Cast a Dynamic in to a concrete value.

reifyEnvironment :: Environment -> forall a. Symbolic a -> Either EnvironmentError (Concrete a) Source #

Turns an environment in to a function for looking up a concrete value from a symbolic one.

reify :: HTraversable t => Environment -> t Symbolic b -> Either EnvironmentError (t Concrete b) Source #

Convert a symbolic structure to a concrete one, using the provided environment.