diff --git a/ChangeLog.md b/ChangeLog.md index 8348ac7..a872916 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,6 @@ # Changelog for fakedata -## 1.0.3 (Unreleased) +## 1.0.3 * [Make the `Fake` type synonym partially applied](https://github.com/fakedata-haskell/fakedata/pull/45) * Implement deterministic output with fixed seed. diff --git a/fakedata.cabal b/fakedata.cabal index 6b41121..ea68989 100644 --- a/fakedata.cabal +++ b/fakedata.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: fakedata -version: 1.0.2 +version: 1.0.3 synopsis: Library for producing fake data description: Please see the README on GitHub at category: Random, Fake, FakeData diff --git a/package.yaml b/package.yaml index f02f2d7..db1f00f 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: fakedata -version: 1.0.2 +version: 1.0.3 github: "psibi/fakedata" license: BSD3 author: "Sibi Prabakaran" diff --git a/src/Faker.hs b/src/Faker.hs index 5870f0c..8460d0c 100644 --- a/src/Faker.hs +++ b/src/Faker.hs @@ -12,7 +12,7 @@ module Faker FakeT (.., Fake), FakerSettings, FakerException (..), - NonDeterministicSeed, + NonDeterministicSeed (..), defaultFakerSettings, -- * Setters @@ -272,7 +272,8 @@ instance (Monoid a, Monad m) => Monoid (FakeT m a) where mempty = pure mempty mappend mx my = mappend <$> mx <*> my --- | Generate fake value with 'defaultFakerSettings' +-- | Generate fake value with 'defaultFakerSettings'. This produces +-- deterministic output by default. -- -- @ -- λ> import qualified Faker.Name as FN @@ -320,12 +321,13 @@ generateWithSettings settings (FakeT f) = do cacheFile <- liftIO $ newIORef HM.empty f $ newSettings {fsCacheField = cacheField, fsCacheFile = cacheFile} --- | Geneerate fake value with 'NonDeterministicSeed' as +-- | Generate fake value with 'NonDeterministicSeed' as -- 'FixedSeed'. The difference between 'generateNonDeterministic' and -- this function is that this uses a fixed seed set via `setRandomGen` -- as it's initial seed value. -- --- Execute this function multiple times will result in same values. +-- Executing this function multiple times will result in generation of +-- same values. -- -- @since 1.0.3 -- @ @@ -343,8 +345,8 @@ generateNonDeterministicWithFixedSeed = } ) --- | NonDeterministicSeed type which controls the behavior of how it's --- non deterministic nature. +-- | NonDeterministicSeed type which controls if a fixed seed is going +-- to be used or if a new seed will be generated each time. -- -- @since 1.0.3 data NonDeterministicSeed