aivika-experiment-5.3.3: Simulation experiments for the Aivika library
CopyrightCopyright (c) 2012-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simulation.Aivika.Experiment.Base.ExperimentWriter

Description

Tested with: GHC 8.0.1

It defines the Exp monad that allows providing computation with an ability to resolve file paths.

Synopsis

Documentation

data ExperimentWriter a Source #

Defines an IO derived computation whithin which we can resolve the unique file paths.

Instances

Instances details
Monad ExperimentWriter Source # 
Instance details

Defined in Simulation.Aivika.Experiment.Base.ExperimentWriter

Functor ExperimentWriter Source # 
Instance details

Defined in Simulation.Aivika.Experiment.Base.ExperimentWriter

Methods

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

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

Applicative ExperimentWriter Source # 
Instance details

Defined in Simulation.Aivika.Experiment.Base.ExperimentWriter

MonadException ExperimentWriter Source # 
Instance details

Defined in Simulation.Aivika.Experiment.Base.ExperimentWriter

MonadIO ExperimentWriter Source # 
Instance details

Defined in Simulation.Aivika.Experiment.Base.ExperimentWriter

Methods

liftIO :: IO a -> ExperimentWriter a #

data ExperimentFilePath Source #

Specifies the file name, unique or writable, which can be appended with extension if required.

Constructors

WritableFilePath FilePath

The file which is overwritten in case if it existed before.

UniqueFilePath FilePath

The file which is always unique, when an automatically generated suffix is added to the name in case of need.

experimentFilePath :: ExperimentFilePath Source #

The default experiment file path.

resolveFilePath :: FilePath -> ExperimentFilePath -> ExperimentWriter FilePath Source #

Resolve the file path relative to the specified directory passed in the first argument and taking into account a possible requirement to have an unique file name.

expandFilePath :: ExperimentFilePath -> Map String String -> ExperimentFilePath Source #

Expand the file path using the specified table of substitutions.

mapFilePath :: (FilePath -> FilePath) -> ExperimentFilePath -> ExperimentFilePath Source #

Transform the file path using the specified function.