ChasingBottoms 1.3.0.7 → 1.3.0.8
raw patch · 12 files changed
+43/−21 lines, 12 filesdep ~QuickCheckdep ~mtl
Dependency ranges changed: QuickCheck, mtl
Files
- ChasingBottoms.cabal +6/−6
- Test/ChasingBottoms.hs +1/−1
- Test/ChasingBottoms/Approx.hs +1/−1
- Test/ChasingBottoms/ApproxShow.hs +1/−1
- Test/ChasingBottoms/ContinuousFunctions.hs +14/−4
- Test/ChasingBottoms/IsBottom.hs +7/−1
- Test/ChasingBottoms/IsBottom/Tests.hs +2/−2
- Test/ChasingBottoms/IsType.hs +1/−1
- Test/ChasingBottoms/Nat.hs +1/−1
- Test/ChasingBottoms/SemanticOrd.hs +1/−1
- Test/ChasingBottoms/TestUtilities/Generators.hs +7/−1
- Test/ChasingBottoms/TimeOut.hs +1/−1
ChasingBottoms.cabal view
@@ -1,8 +1,8 @@ name: ChasingBottoms-version: 1.3.0.7+version: 1.3.0.8 license: MIT license-file: LICENCE-copyright: Copyright (c) Nils Anders Danielsson 2004-2013.+copyright: Copyright (c) Nils Anders Danielsson 2004-2014. author: Nils Anders Danielsson maintainer: http://www.cse.chalmers.se/~nad/ synopsis: For testing partial and infinite values.@@ -121,8 +121,8 @@ other-modules: Test.ChasingBottoms.IsType - build-depends: QuickCheck >= 2.1 && < 2.7,- mtl >= 1.1 && < 2.2,+ build-depends: QuickCheck >= 2.1 && < 2.8,+ mtl >= 1.1 && < 2.3, base >= 4.0 && < 4.8, containers >= 0.3 && < 0.6, random == 1.0.*,@@ -150,8 +150,8 @@ Test.ChasingBottoms.TestUtilities.Generators, Test.ChasingBottoms.TimeOut.Tests - build-depends: QuickCheck >= 2.1 && < 2.7,- mtl >= 1.1 && < 2.2,+ build-depends: QuickCheck >= 2.1 && < 2.8,+ mtl >= 1.1 && < 2.3, base >= 4.0 && < 4.8, containers >= 0.3 && < 0.6, random == 1.0.*,
Test/ChasingBottoms.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Test.ChasingBottoms--- Copyright : (c) Nils Anders Danielsson 2004-2013+-- Copyright : (c) Nils Anders Danielsson 2004-2014 -- License : See the file LICENCE. -- -- Maintainer : http://www.cse.chalmers.se/~nad/
Test/ChasingBottoms/Approx.hs view
@@ -3,7 +3,7 @@ -- | -- Module : Test.ChasingBottoms.Approx--- Copyright : (c) Nils Anders Danielsson 2004-2013+-- Copyright : (c) Nils Anders Danielsson 2004-2014 -- License : See the file LICENCE. -- -- Maintainer : http://www.cse.chalmers.se/~nad/
Test/ChasingBottoms/ApproxShow.hs view
@@ -3,7 +3,7 @@ -- | -- Module : Test.ChasingBottoms.ApproxShow--- Copyright : (c) Nils Anders Danielsson 2004-2013+-- Copyright : (c) Nils Anders Danielsson 2004-2014 -- License : See the file LICENCE. -- -- Maintainer : http://www.cse.chalmers.se/~nad/
Test/ChasingBottoms/ContinuousFunctions.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE RankNTypes, ScopedTypeVariables,+{-# LANGUAGE CPP, RankNTypes, ScopedTypeVariables, GeneralizedNewtypeDeriving, DeriveDataTypeable #-} -- TODO: Can we pattern match on functions?@@ -12,7 +12,7 @@ -- | -- Module : Test.ChasingBottoms.ContinuousFunctions--- Copyright : (c) Nils Anders Danielsson 2005-2013+-- Copyright : (c) Nils Anders Danielsson 2005-2014 -- License : See the file LICENCE. -- -- Maintainer : http://www.cse.chalmers.se/~nad/@@ -143,13 +143,23 @@ , listOf ) where -import Test.QuickCheck hiding ((><), listOf)+import Test.QuickCheck+ hiding ( (><)+ , listOf+#if MIN_VERSION_QuickCheck(2,7,0)+ , infiniteListOf+#endif+ )+#if MIN_VERSION_QuickCheck(2,7,0)+import Test.QuickCheck.Gen.Unsafe (promote)+#endif import Data.Sequence as Seq import Data.Foldable as Seq (foldr) import Prelude as P hiding (concat) import Test.ChasingBottoms.IsBottom import Control.Monad import Control.Monad.Reader+import Control.Applicative import Control.Arrow import System.Random import Data.Generics@@ -264,7 +274,7 @@ newtype MakeResult a = MR { unMR :: ReaderT PatternMatches Gen a }- deriving (Functor, Monad)+ deriving (Functor, Applicative, Monad) type PatternMatches = Seq PatternMatch
Test/ChasingBottoms/IsBottom.hs view
@@ -1,8 +1,11 @@ {-# LANGUAGE ScopedTypeVariables #-}+-- The following (possibly unnecessary) options are included due to+-- the use of unsafePerformIO below.+{-# OPTIONS_GHC -fno-cse -fno-full-laziness #-} -- | -- Module : Test.ChasingBottoms.IsBottom--- Copyright : (c) Nils Anders Danielsson 2004-2013+-- Copyright : (c) Nils Anders Danielsson 2004-2014 -- License : See the file LICENCE. -- -- Maintainer : http://www.cse.chalmers.se/~nad/@@ -90,6 +93,9 @@ -- 'isBottomTimeOut' is subject to all the same vagaries as -- 'T.timeOut'. +-- The following pragma is included due to the use of unsafePerformIO+-- below.+{-# NOINLINE isBottomTimeOut #-} isBottomTimeOut :: Maybe Int -> a -> Bool isBottomTimeOut timeOutLimit f = unsafePerformIO $ maybeTimeOut (E.evaluate f) `E.catches`
Test/ChasingBottoms/IsBottom/Tests.hs view
@@ -22,7 +22,7 @@ data T' a = L' | B' (T' a) (T' a) deriving Eq -instance Monad T'+instance Functor T' leftInfinite' = B' leftInfinite' L' @@ -56,7 +56,7 @@ -- Missing methods. -- Skip this test to avoid compiler warnings.- , isBottom (L' >> L')+ , isBottom (fmap id L') -- Array stuff. , isBottom (array (1,0) [] ! 0)
Test/ChasingBottoms/IsType.hs view
@@ -1,6 +1,6 @@ -- | -- Module : Test.ChasingBottoms.IsType--- Copyright : (c) Nils Anders Danielsson 2004-2013+-- Copyright : (c) Nils Anders Danielsson 2004-2014 -- License : See the file LICENCE. -- -- Maintainer : http://www.cse.chalmers.se/~nad/
Test/ChasingBottoms/Nat.hs view
@@ -2,7 +2,7 @@ -- | -- Module : Test.ChasingBottoms.Nat--- Copyright : (c) Nils Anders Danielsson 2004-2013+-- Copyright : (c) Nils Anders Danielsson 2004-2014 -- License : See the file LICENCE. -- -- Maintainer : http://www.cse.chalmers.se/~nad/
Test/ChasingBottoms/SemanticOrd.hs view
@@ -3,7 +3,7 @@ -- | -- Module : Test.ChasingBottoms.SemanticOrd--- Copyright : (c) Nils Anders Danielsson 2004-2013+-- Copyright : (c) Nils Anders Danielsson 2004-2014 -- License : See the file LICENCE. -- -- Maintainer : http://www.cse.chalmers.se/~nad/
Test/ChasingBottoms/TestUtilities/Generators.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE RankNTypes, DeriveDataTypeable #-}+{-# LANGUAGE CPP, RankNTypes, DeriveDataTypeable #-} -- | Generators that are part of the testing framework. @@ -47,6 +47,12 @@ import Test.ChasingBottoms.SemanticOrd import Test.ChasingBottoms.TestUtilities import Test.QuickCheck+#if MIN_VERSION_QuickCheck(2,7,0)+ hiding (infiniteListOf)+#endif+#if MIN_VERSION_QuickCheck(2,7,0)+import Test.QuickCheck.Gen.Unsafe (promote)+#endif import Data.Generics import Control.Monad import Data.Maybe
Test/ChasingBottoms/TimeOut.hs view
@@ -2,7 +2,7 @@ -- | -- Module : Test.ChasingBottoms.TimeOut--- Copyright : (c) Nils Anders Danielsson 2004-2013+-- Copyright : (c) Nils Anders Danielsson 2004-2014 -- License : See the file LICENCE. -- -- Maintainer : http://www.cse.chalmers.se/~nad/