Skip to content

Commit

Permalink
Restore to v1.1.1 without losing contribs
Browse files Browse the repository at this point in the history
Listed below are the messages of the squashed revert commits.
Revert "Switch to using FairLogicT in Series and CoSeries"

This reverts commit 4f6195e.

Revert "Define FairLogicT"

This reverts commit a1cad0d.

Revert "CoSeries newtype"

This reverts commit f6c7054.

Revert "Merge SeriesMonad into Series.Types"

This reverts commit a47f4a6.

Revert "Test.SmallCheck.Series.Types"

This reverts commit 6527d6e.

Revert "Printing partial functions"

This reverts commit 64f92fe.

Revert "Export :->"

This reverts commit 728342c.

Revert "Introduce coseriesP: generating partial functions"

This reverts commit bebcecb.

Move `SeriesMonad` to `src`
  • Loading branch information
jdnavarro committed Sep 16, 2015
1 parent 29c5198 commit 39d1166
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 250 deletions.
2 changes: 1 addition & 1 deletion smallcheck.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ Library
Test.SmallCheck.Series
Other-modules:
Test.SmallCheck.Property
Test.SmallCheck.Series.Types
Test.SmallCheck.SeriesMonad
Test.SmallCheck.Property.Result
12 changes: 4 additions & 8 deletions src/Test/SmallCheck/Property.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module Test.SmallCheck.Property (
) where

import Test.SmallCheck.Series
import Test.SmallCheck.Series.Types
import Test.SmallCheck.SeriesMonad
import Test.SmallCheck.Property.Result
import Control.Monad
import Control.Monad.Logic
Expand Down Expand Up @@ -111,16 +111,12 @@ runProperty depth hook prop =
flip runReader (Env Forall hook) $
unProperty prop

atomicProperty
:: Monad m
=> Series m PropertySuccess
-> Series m PropertyFailure
-> PropertySeries m
atomicProperty :: Series m PropertySuccess -> Series m PropertyFailure -> PropertySeries m
atomicProperty s f =
let prop = PropertySeries s f (pure (Property $ pure prop, []))
in prop

makeAtomic :: Monad m => Property m -> Property m
makeAtomic :: Property m -> Property m
makeAtomic (Property prop) =
Property $ flip fmap prop $ \ps ->
atomicProperty (searchExamples ps) (searchCounterExamples ps)
Expand Down Expand Up @@ -275,7 +271,7 @@ atMost n m
------------------------------
-- {{{

quantify :: Monad m => Quantification -> Property m -> Property m
quantify :: Quantification -> Property m -> Property m
quantify q (Property a) =
makeAtomic $ Property $ local (\env -> env { quantification = q }) a

Expand Down
Loading

0 comments on commit 39d1166

Please sign in to comment.