quickcheck-io 0.1.4 → 0.2.0
raw patch · 3 files changed
+18/−15 lines, 3 filesdep ~QuickCheck
Dependency ranges changed: QuickCheck
Files
- LICENSE +1/−1
- quickcheck-io.cabal +6/−4
- src/Test/QuickCheck/IO.hs +11/−10
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2013 Simon Hengel <sol@typeful.net>+Copyright (c) 2013-2017 Simon Hengel <sol@typeful.net> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
quickcheck-io.cabal view
@@ -1,9 +1,9 @@--- This file has been generated from package.yaml by hpack version 0.15.0.+-- This file has been generated from package.yaml by hpack version 0.18.0. -- -- see: https://github.com/sol/hpack name: quickcheck-io-version: 0.1.4+version: 0.2.0 synopsis: Use HUnit assertions as QuickCheck properties description: This package provides an orphan instance that allows you to use HUnit assertions as QuickCheck properties.@@ -12,7 +12,7 @@ bug-reports: https://github.com/hspec/quickcheck-io/issues license: MIT license-file: LICENSE-copyright: (c) 2013 Simon Hengel+copyright: (c) 2013-2017 Simon Hengel author: Simon Hengel <sol@typeful.net> maintainer: Simon Hengel <sol@typeful.net> build-type: Simple@@ -27,9 +27,11 @@ src ghc-options: -Wall build-depends:- QuickCheck >= 2.5.1+ QuickCheck >= 2.7 , HUnit >= 1.2.5 , base == 4.* exposed-modules: Test.QuickCheck.IO+ other-modules:+ Paths_quickcheck_io default-language: Haskell2010
src/Test/QuickCheck/IO.hs view
@@ -1,4 +1,6 @@-{-# LANGUAGE CPP, TypeSynonymInstances, FlexibleInstances #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE TypeSynonymInstances #-}+{-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Test.QuickCheck.IO where @@ -13,19 +15,18 @@ #endif propertyIO :: Assertion -> Property-#if MIN_VERSION_QuickCheck(2,7,0) propertyIO action = ioProperty $ do-#else-propertyIO action = morallyDubiousIOProperty $ do-#endif- (action >> return succeeded) `E.catch`+ (action >> return succeeded) `E.catch` \ e ->+ return failed {theException = Just (E.toException e), reason = formatAssertion e}+ where+ formatAssertion e = case e of #if MIN_VERSION_HUnit(1,3,0)- \(HUnitFailure _ err) ->+ HUnitFailure _ err -> #else- \(HUnitFailure err) ->+ HUnitFailure err -> #endif #if MIN_VERSION_HUnit(1,5,0)- return failed {reason = formatFailureReason err}+ formatFailureReason err #else- return failed {reason = err}+ err #endif