hspec-golden-aeson-0.9.0.0: Use tests to monitor changes in Aeson serialization
Copyright(c) Plow Technologies 2016
LicenseBSD3
Maintainermchaver@gmail.com
StabilityBeta
Safe HaskellNone
LanguageHaskell2010

Test.Aeson.Internal.RandomSamples

Description

Internal module, use at your own risk.

Synopsis

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.

Constructors

RandomSamples 

Fields

Instances

Instances details
Eq a => Eq (RandomSamples a) Source # 
Instance details

Defined in Test.Aeson.Internal.RandomSamples

Methods

(==) :: RandomSamples a -> RandomSamples a -> Bool

(/=) :: RandomSamples a -> RandomSamples a -> Bool

Ord a => Ord (RandomSamples a) Source # 
Instance details

Defined in Test.Aeson.Internal.RandomSamples

Show a => Show (RandomSamples a) Source # 
Instance details

Defined in Test.Aeson.Internal.RandomSamples

Methods

showsPrec :: Int -> RandomSamples a -> ShowS

show :: RandomSamples a -> String

showList :: [RandomSamples a] -> ShowS

Generic (RandomSamples a) Source # 
Instance details

Defined in Test.Aeson.Internal.RandomSamples

Associated Types

type Rep (RandomSamples a) :: Type -> Type

Methods

from :: RandomSamples a -> Rep (RandomSamples a) x

to :: Rep (RandomSamples a) x -> RandomSamples a

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

Defined in Test.Aeson.Internal.RandomSamples

Methods

parseJSON :: Value -> Parser (RandomSamples a)

parseJSONList :: Value -> Parser [RandomSamples a]

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

Defined in Test.Aeson.Internal.RandomSamples

Methods

toJSON :: RandomSamples a -> Value

toEncoding :: RandomSamples a -> Encoding

toJSONList :: [RandomSamples a] -> Value

toEncodingList :: [RandomSamples a] -> Encoding

type Rep (RandomSamples a) Source # 
Instance details

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])))

setSeed :: Int -> Gen a -> Gen a Source #

Apply the seed.

readSeed :: ByteString -> IO Int32 Source #

Reads the seed without looking at the samples.

readSampleSize :: ByteString -> IO Int Source #

Read the sample size.