Copyright | (c) Plow Technologies 2016 |
---|---|
License | BSD3 |
Maintainer | mchaver@gmail.com |
Stability | Beta |
Safe Haskell | None |
Language | Haskell2010 |
Internal module, use at your own risk.
Synopsis
- data RandomSamples a = RandomSamples {}
- setSeed :: Int -> Gen a -> Gen a
- readSeed :: ByteString -> IO Int32
- readSampleSize :: ByteString -> IO Int
Documentation
data RandomSamples a Source #
RandomSamples, using a seed allows you to replicate an arbitrary. By storing the seed and the samples (previously produced arbitraries), we can try to reproduce the same samples by generating the arbitraries with a seed.
Instances
Eq a => Eq (RandomSamples a) Source # | |
Defined in Test.Aeson.Internal.RandomSamples (==) :: RandomSamples a -> RandomSamples a -> Bool (/=) :: RandomSamples a -> RandomSamples a -> Bool | |
Ord a => Ord (RandomSamples a) Source # | |
Defined in Test.Aeson.Internal.RandomSamples compare :: RandomSamples a -> RandomSamples a -> Ordering (<) :: RandomSamples a -> RandomSamples a -> Bool (<=) :: RandomSamples a -> RandomSamples a -> Bool (>) :: RandomSamples a -> RandomSamples a -> Bool (>=) :: RandomSamples a -> RandomSamples a -> Bool max :: RandomSamples a -> RandomSamples a -> RandomSamples a min :: RandomSamples a -> RandomSamples a -> RandomSamples a | |
Show a => Show (RandomSamples a) Source # | |
Defined in Test.Aeson.Internal.RandomSamples showsPrec :: Int -> RandomSamples a -> ShowS show :: RandomSamples a -> String showList :: [RandomSamples a] -> ShowS | |
Generic (RandomSamples a) Source # | |
Defined in Test.Aeson.Internal.RandomSamples type Rep (RandomSamples a) :: Type -> Type from :: RandomSamples a -> Rep (RandomSamples a) x to :: Rep (RandomSamples a) x -> RandomSamples a | |
FromJSON a => FromJSON (RandomSamples a) Source # | |
Defined in Test.Aeson.Internal.RandomSamples parseJSON :: Value -> Parser (RandomSamples a) parseJSONList :: Value -> Parser [RandomSamples a] | |
ToJSON a => ToJSON (RandomSamples a) Source # | |
Defined in Test.Aeson.Internal.RandomSamples toJSON :: RandomSamples a -> Value toEncoding :: RandomSamples a -> Encoding toJSONList :: [RandomSamples a] -> Value toEncodingList :: [RandomSamples a] -> Encoding | |
type Rep (RandomSamples a) Source # | |
Defined in Test.Aeson.Internal.RandomSamples type Rep (RandomSamples a) = D1 ('MetaData "RandomSamples" "Test.Aeson.Internal.RandomSamples" "hspec-golden-aeson-0.9.0.0-inplace" 'False) (C1 ('MetaCons "RandomSamples" 'PrefixI 'True) (S1 ('MetaSel ('Just "seed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int32) :*: S1 ('MetaSel ('Just "samples") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a]))) |
readSampleSize :: ByteString -> IO Int Source #
Read the sample size.