show 0.2 → 0.3
raw patch · 2 files changed
+10/−5 lines, 2 filesdep +smallcheckPVP ok
version bump matches the API change (PVP)
Dependencies added: smallcheck
API changes (from Hackage documentation)
+ ShowQ: mysmallcheck :: (Testable a) => a -> ()
+ ShowQ: mysmallcheck' :: (Testable a) => a -> IO ()
Files
- ShowQ.hs +7/−2
- show.cabal +3/−3
ShowQ.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE NoMonomorphismRestriction #-} -- Helper code for runplugs -- -- Note: must be kept in separate module to hide unsafePerformIO from@@ -7,10 +8,9 @@ -- import Language.Haskell.TH import System.IO.Unsafe-import Data.Dynamic import Data.Ratio -import Test.QuickCheck.Batch+import qualified Test.SmallCheck (smallCheck, Testable) import Test.QuickCheck import Data.Char import Data.List@@ -66,6 +66,11 @@ integralRandomR (a,b) g = case randomR (fromIntegral a :: Integer, fromIntegral b :: Integer) g of (x,g) -> (fromIntegral x, g)++mysmallcheck :: (Test.SmallCheck.Testable a) => a -> ()+mysmallcheck = unsafePerformIO . mysmallcheck'+mysmallcheck' :: (Test.SmallCheck.Testable a) => a -> IO ()+mysmallcheck' a = Test.SmallCheck.smallCheck 6 a myquickcheck :: Testable a => a -> String myquickcheck = unsafePerformIO . myquickcheck'
show.cabal view
@@ -1,5 +1,5 @@ name: show-version: 0.2+version: 0.3 license: GPL license-file: LICENSE@@ -13,7 +13,7 @@ . ShowFun gives us Typeable instances for neutring IO expressions. .- ShowQ adds QuickCheck support.+ ShowQ adds SmallCheck & QuickCheck support. . And SimpleReflect allows us to literally see how functions 'expand', through appropriate Show magic. See <http://twan.home.fmf.nl/blog/haskell/simple-reflection-of-expressions.details>.@@ -25,7 +25,7 @@ library exposed-modules: ShowQ, ShowFun, SimpleReflect - build-depends: base, random, QuickCheck<2+ build-depends: base, random, QuickCheck<2, smallcheck>=0.4 ghc-options: -Wall ghc-prof-options: -prof -auto-all