Copyright | (c) Dominik Schrempf 2021 |
---|---|
License | GPL-3.0-or-later |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Creation date: Tue Nov 19 15:07:09 2019.
Use of standard input is not supported.
Synopsis
- data SeedOpt
- class Reproducible a where
- getReproductionHash :: forall a. Reproducible a => Reproduction a -> String
- data Reproduction a = Reproduction {}
- writeReproduction :: forall a. (Eq a, Show a, Reproducible a, ToJSON a) => String -> a -> IO ()
- hashFile :: FilePath -> IO ByteString
Reproduction
Random or fixed seed.
Instances
Eq SeedOpt Source # | |
Show SeedOpt Source # | |
Generic SeedOpt Source # | |
ToJSON SeedOpt Source # | |
Defined in ELynx.Tools.Reproduction | |
FromJSON SeedOpt Source # | |
type Rep SeedOpt Source # | |
Defined in ELynx.Tools.Reproduction type Rep SeedOpt = D1 ('MetaData "SeedOpt" "ELynx.Tools.Reproduction" "elynx-tools-0.6.1.1-HY6W10ikT2E9S4g6F3JO6E" '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.
inFiles :: a -> [FilePath] Source #
outSuffixes :: a -> [String] Source #
getSeed :: a -> Maybe SeedOpt Source #
Instances
Reproducible a => Reproducible (Arguments a) Source # | |
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!
Instances
writeReproduction :: forall a. (Eq a, Show a, Reproducible a, ToJSON a) => String -> a -> IO () Source #
Write an ELynx reproduction file.