elynx-tools-0.6.1.0: Tools for ELynx
Copyright(c) Dominik Schrempf 2021
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

ELynx.Tools.Reproduction

Contents

Description

Creation date: Tue Nov 19 15:07:09 2019.

Use of standard input is not supported.

Synopsis

Reproduction

data SeedOpt Source #

Random or fixed seed.

Instances

Instances details
Eq SeedOpt Source # 
Instance details

Defined in ELynx.Tools.Reproduction

Methods

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

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

Show SeedOpt Source # 
Instance details

Defined in ELynx.Tools.Reproduction

Generic SeedOpt Source # 
Instance details

Defined in ELynx.Tools.Reproduction

Associated Types

type Rep SeedOpt :: Type -> Type #

Methods

from :: SeedOpt -> Rep SeedOpt x #

to :: Rep SeedOpt x -> SeedOpt #

ToJSON SeedOpt Source # 
Instance details

Defined in ELynx.Tools.Reproduction

FromJSON SeedOpt Source # 
Instance details

Defined in ELynx.Tools.Reproduction

type Rep SeedOpt Source # 
Instance details

Defined in ELynx.Tools.Reproduction

type Rep SeedOpt = D1 ('MetaData "SeedOpt" "ELynx.Tools.Reproduction" "elynx-tools-0.6.1.0-AWjKNFEpQDhHVmYwSmmoU2" 'False) (C1 ('MetaCons "RandomUnset" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RandomSet" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Word32))) :+: C1 ('MetaCons "Fixed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Word32)))))

class Reproducible a where Source #

Reproducible commands have - a set of input files to be checked for consistency, - a set of output suffixes which define output files to be checked for consistency, - a function to get the seed, if available, - a function to set the seed, if applicable, - a parser to read the command line, - a nice program name, description, and footer.

Minimal complete definition

inFiles, outSuffixes, getSeed, setSeed, parser, cmdName, cmdDsc

getReproductionHash :: forall a. Reproducible a => Reproduction a -> String Source #

A unique hash of the reproduction data type.

data Reproduction a Source #

Necessary information for a reproducible run. Notably, the input files are checked for consistency!

Constructors

Reproduction 

Fields

Instances

Instances details
Generic (Reproduction a) Source # 
Instance details

Defined in ELynx.Tools.Reproduction

Associated Types

type Rep (Reproduction a) :: Type -> Type #

Methods

from :: Reproduction a -> Rep (Reproduction a) x #

to :: Rep (Reproduction a) x -> Reproduction a #

ToJSON a => ToJSON (Reproduction a) Source # 
Instance details

Defined in ELynx.Tools.Reproduction

FromJSON a => FromJSON (Reproduction a) Source # 
Instance details

Defined in ELynx.Tools.Reproduction

type Rep (Reproduction a) Source # 
Instance details

Defined in ELynx.Tools.Reproduction

writeReproduction :: forall a. (Eq a, Show a, Reproducible a, ToJSON a) => String -> a -> IO () Source #

Write an ELynx reproduction file.

hashFile :: FilePath -> IO ByteString Source #

Helper function.