quickcheck-state-machine-0.4.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>
Portabilitynon-portable (GHC extensions)
Safe HaskellNone



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



emptyEnvironment :: Environment Source #

Create an empty environment.

insertConcrete :: Var -> Dynamic -> 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 :: Traversable t => Environment -> t Symbolic -> Either EnvironmentError (t Concrete) Source #

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