packages feed

savage 1.0.2 → 1.0.3

raw patch · 3 files changed

+21/−1 lines, 3 files

Files

+ CHANGELOG.md view
savage.cabal view
@@ -1,4 +1,4 @@-version: 1.0.2+version: 1.0.3  name:   savage
src/Savage/Internal/Gen.hs view
@@ -123,6 +123,8 @@   , printTree   , printWith   , printTreeWith+  , printOnly+  , printWithOnly    -- * Internal   -- $internal@@ -1532,6 +1534,24 @@               pure $ nodeValue x     in       loop (100 :: Int)++-- | Print the value produced by a generator, for the given size and seed.+--+printWithOnly :: (MonadIO m, Show a) => Size -> Seed -> Gen a -> m ()+printWithOnly size seed gen =+  liftIO $ do+    let+      Node x ss =+        runIdentity . runTree $ renderNodes size seed gen+    +    putStrLn x++-- | Run a generator and print the value produced by it.+--+printOnly :: (MonadIO m, Show a) => Gen a -> m ()+printOnly gen = do+  seed <- liftIO Seed.random+  printWithOnly 0 seed gen  -- | Print the value produced by a generator, and the first level of shrinks, --   for the given size and seed.