ChasingBottoms 1.3.0 → 1.3.0.1
raw patch · 12 files changed
+42/−42 lines, 12 filesdep ~QuickCheckdep ~basedep ~containersPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: QuickCheck, base, containers, mtl, syb
API changes (from Hackage documentation)
- Test.ChasingBottoms.Approx: instance (Data a) => Approx a
- Test.ChasingBottoms.ApproxShow: instance (Data a) => ApproxShow a
- Test.ChasingBottoms.ContinuousFunctions: instance (Data a) => Data (Tree a)
- Test.ChasingBottoms.ContinuousFunctions: instance (Show a) => Show (Tree a)
- Test.ChasingBottoms.SemanticOrd: instance (Data a) => SemanticEq a
- Test.ChasingBottoms.SemanticOrd: instance (Data a) => SemanticOrd a
- Test.ChasingBottoms.TimeOut: instance (Show a) => Show (Result a)
+ Test.ChasingBottoms.Approx: instance Data a => Approx a
+ Test.ChasingBottoms.ApproxShow: instance Data a => ApproxShow a
+ Test.ChasingBottoms.ContinuousFunctions: instance Data a => Data (Tree a)
+ Test.ChasingBottoms.ContinuousFunctions: instance Show a => Show (Tree a)
+ Test.ChasingBottoms.SemanticOrd: instance Data a => SemanticEq a
+ Test.ChasingBottoms.SemanticOrd: instance Data a => SemanticOrd a
+ Test.ChasingBottoms.TimeOut: instance Show a => Show (Result a)
- Test.ChasingBottoms.Approx: approx :: (Approx a) => Nat -> a -> a
+ Test.ChasingBottoms.Approx: approx :: Approx a => Nat -> a -> a
- Test.ChasingBottoms.Approx: approxAll :: (Approx a) => Nat -> a -> a
+ Test.ChasingBottoms.Approx: approxAll :: Approx a => Nat -> a -> a
- Test.ChasingBottoms.ApproxShow: approxShow :: (ApproxShow a) => Nat -> a -> String
+ Test.ChasingBottoms.ApproxShow: approxShow :: ApproxShow a => Nat -> a -> String
- Test.ChasingBottoms.ApproxShow: approxShows :: (ApproxShow a) => Nat -> a -> ShowS
+ Test.ChasingBottoms.ApproxShow: approxShows :: ApproxShow a => Nat -> a -> ShowS
- Test.ChasingBottoms.ApproxShow: approxShowsPrec :: (ApproxShow a) => Nat -> Prec -> a -> ShowS
+ Test.ChasingBottoms.ApproxShow: approxShowsPrec :: ApproxShow a => Nat -> Prec -> a -> ShowS
- Test.ChasingBottoms.ContinuousFunctions: arbitrary' :: (Arbitrary a) => MakeResult a
+ Test.ChasingBottoms.ContinuousFunctions: arbitrary' :: Arbitrary a => MakeResult a
- Test.ChasingBottoms.ContinuousFunctions: choose' :: (Random a) => (a, a) -> MakeResult a
+ Test.ChasingBottoms.ContinuousFunctions: choose' :: Random a => (a, a) -> MakeResult a
- Test.ChasingBottoms.ContinuousFunctions: flat :: (Arbitrary a) => MakeResult a
+ Test.ChasingBottoms.ContinuousFunctions: flat :: Arbitrary a => MakeResult a
- Test.ChasingBottoms.ContinuousFunctions: functionTo :: (Data a) => MakeResult b -> Gen (a -> b)
+ Test.ChasingBottoms.ContinuousFunctions: functionTo :: Data a => MakeResult b -> Gen (a -> b)
- Test.ChasingBottoms.ContinuousFunctions: match :: (Data a) => MakePM a
+ Test.ChasingBottoms.ContinuousFunctions: match :: Data a => MakePM a
- Test.ChasingBottoms.SemanticOrd: (/=!) :: (SemanticEq a) => a -> a -> Bool
+ Test.ChasingBottoms.SemanticOrd: (/=!) :: SemanticEq a => a -> a -> Bool
- Test.ChasingBottoms.SemanticOrd: (/\!) :: (SemanticOrd a) => a -> a -> a
+ Test.ChasingBottoms.SemanticOrd: (/\!) :: SemanticOrd a => a -> a -> a
- Test.ChasingBottoms.SemanticOrd: (<!) :: (SemanticOrd a) => a -> a -> Bool
+ Test.ChasingBottoms.SemanticOrd: (<!) :: SemanticOrd a => a -> a -> Bool
- Test.ChasingBottoms.SemanticOrd: (<=!) :: (SemanticOrd a) => a -> a -> Bool
+ Test.ChasingBottoms.SemanticOrd: (<=!) :: SemanticOrd a => a -> a -> Bool
- Test.ChasingBottoms.SemanticOrd: (==!) :: (SemanticEq a) => a -> a -> Bool
+ Test.ChasingBottoms.SemanticOrd: (==!) :: SemanticEq a => a -> a -> Bool
- Test.ChasingBottoms.SemanticOrd: (>!) :: (SemanticOrd a) => a -> a -> Bool
+ Test.ChasingBottoms.SemanticOrd: (>!) :: SemanticOrd a => a -> a -> Bool
- Test.ChasingBottoms.SemanticOrd: (>=!) :: (SemanticOrd a) => a -> a -> Bool
+ Test.ChasingBottoms.SemanticOrd: (>=!) :: SemanticOrd a => a -> a -> Bool
- Test.ChasingBottoms.SemanticOrd: (\/!) :: (SemanticOrd a) => a -> a -> Maybe a
+ Test.ChasingBottoms.SemanticOrd: (\/!) :: SemanticOrd a => a -> a -> Maybe a
- Test.ChasingBottoms.SemanticOrd: class (SemanticEq a) => SemanticOrd a
+ Test.ChasingBottoms.SemanticOrd: class SemanticEq a => SemanticOrd a
- Test.ChasingBottoms.SemanticOrd: semanticCompare :: (SemanticOrd a) => Tweak -> a -> a -> Maybe Ordering
+ Test.ChasingBottoms.SemanticOrd: semanticCompare :: SemanticOrd a => Tweak -> a -> a -> Maybe Ordering
- Test.ChasingBottoms.SemanticOrd: semanticEq :: (SemanticEq a) => Tweak -> a -> a -> Bool
+ Test.ChasingBottoms.SemanticOrd: semanticEq :: SemanticEq a => Tweak -> a -> a -> Bool
- Test.ChasingBottoms.SemanticOrd: semanticJoin :: (SemanticOrd a) => Tweak -> a -> a -> Maybe a
+ Test.ChasingBottoms.SemanticOrd: semanticJoin :: SemanticOrd a => Tweak -> a -> a -> Maybe a
- Test.ChasingBottoms.SemanticOrd: semanticMeet :: (SemanticOrd a) => Tweak -> a -> a -> a
+ Test.ChasingBottoms.SemanticOrd: semanticMeet :: SemanticOrd a => Tweak -> a -> a -> a
Files
- ChasingBottoms.cabal +17/−17
- LICENCE +1/−1
- Test/ChasingBottoms.hs +2/−2
- Test/ChasingBottoms/Approx.hs +2/−2
- Test/ChasingBottoms/ApproxShow.hs +2/−2
- Test/ChasingBottoms/ContinuousFunctions.hs +6/−6
- Test/ChasingBottoms/ContinuousFunctions/Tests.hs +2/−2
- Test/ChasingBottoms/IsBottom.hs +2/−2
- Test/ChasingBottoms/IsType.hs +2/−2
- Test/ChasingBottoms/Nat.hs +2/−2
- Test/ChasingBottoms/SemanticOrd.hs +2/−2
- Test/ChasingBottoms/TimeOut.hs +2/−2
ChasingBottoms.cabal view
@@ -1,10 +1,10 @@ name: ChasingBottoms-version: 1.3.0+version: 1.3.0.1 license: OtherLicense license-file: LICENCE-copyright: Copyright (c) Nils Anders Danielsson 2004-2010.+copyright: Copyright (c) Nils Anders Danielsson 2004-2011. author: Nils Anders Danielsson-maintainer: http://www.cs.nott.ac.uk/~nad/contact.html+maintainer: http://www.cse.chalmers.se/~nad/ synopsis: For testing partial and infinite values. description: Do you ever feel the need to test code involving bottoms (e.g. calls to@@ -15,7 +15,7 @@ waiting to see how much gets printed before the first exception is encountered. However, that quickly gets tiresome and is hard to automate using e.g. QuickCheck- (<http://www.cs.chalmers.se/~rjmh/QuickCheck/>). With this library you+ (<http://www.cse.chalmers.se/~rjmh/QuickCheck/>). With this library you can do the tests as simply as the following examples show. . Testing explicitly for bottoms:@@ -92,15 +92,15 @@ For the underlying theory and a larger example involving use of QuickCheck, see the article \"Chasing Bottoms, A Case Study in Program Verification in the Presence of Partial and Infinite Values\"- (<http://www.cs.nott.ac.uk/~nad/publications/danielsson-jansson-mpc2004.html>).+ (<http://www.cse.chalmers.se/~nad/publications/danielsson-jansson-mpc2004.html>). .- The code has been tested under GHC 6.12. Most parts can probably be+ The code has been tested under GHC 7.0. Most parts can probably be ported to other Haskell compilers, but that would require some work. The @TimeOut@ functions require preemptive scheduling, and most of the rest requires @Data.Generics@; @isBottom@ only requires exceptions, though. category: Testing-tested-with: GHC == 6.12.1+tested-with: GHC == 7.0.1 cabal-version: == 1.8.* build-type: Simple @@ -117,12 +117,12 @@ other-modules: Test.ChasingBottoms.IsType - build-depends: QuickCheck == 2.1.*,- mtl == 1.1.*,- base == 4.*,- containers == 0.3.*,+ build-depends: QuickCheck >= 2.1 && < 2.5,+ mtl >= 1.1 && < 2.1,+ base >= 4.0 && < 4.4,+ containers >= 0.3 && < 0.5, random == 1.0.*,- syb >= 0.1.0.2 && < 0.2+ syb >= 0.1.0.2 && < 0.3 flag build-tests description: Build the test suite.@@ -146,10 +146,10 @@ Test.ChasingBottoms.TestUtilities.Generators, Test.ChasingBottoms.TimeOut.Tests - build-depends: QuickCheck == 2.1.*,- mtl == 1.1.*,- base == 4.*,- containers == 0.3.*,+ build-depends: QuickCheck >= 2.1 && < 2.5,+ mtl >= 1.1 && < 2.1,+ base >= 4.0 && < 4.4,+ containers >= 0.3 && < 0.5, random == 1.0.*,- syb >= 0.1.0.2 && < 0.2,+ syb >= 0.1.0.2 && < 0.3, array == 0.3.*
LICENCE view
@@ -1,7 +1,7 @@ I have chosen to distribute this library under the MIT/Expat licence: --------------------------------------------------------------------- -Copyright (c) 2004-2010 Nils Anders Danielsson+Copyright (c) 2004-2011 Nils Anders Danielsson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
Test/ChasingBottoms.hs view
@@ -1,9 +1,9 @@ -- | -- Module : Test.ChasingBottoms--- Copyright : (c) Nils Anders Danielsson 2004-2010+-- Copyright : (c) Nils Anders Danielsson 2004-2011 -- License : See the file LICENCE. ----- Maintainer : http://www.cs.nott.ac.uk/~nad/+-- Maintainer : http://www.cse.chalmers.se/~nad/ -- Stability : experimental -- Portability : non-portable (GHC-specific) --
Test/ChasingBottoms/Approx.hs view
@@ -3,10 +3,10 @@ -- | -- Module : Test.ChasingBottoms.Approx--- Copyright : (c) Nils Anders Danielsson 2004-2010+-- Copyright : (c) Nils Anders Danielsson 2004-2011 -- License : See the file LICENCE. ----- Maintainer : http://www.cs.nott.ac.uk/~nad/+-- Maintainer : http://www.cse.chalmers.se/~nad/ -- Stability : experimental -- Portability : non-portable (GHC-specific) --
Test/ChasingBottoms/ApproxShow.hs view
@@ -3,10 +3,10 @@ -- | -- Module : Test.ChasingBottoms.ApproxShow--- Copyright : (c) Nils Anders Danielsson 2004-2010+-- Copyright : (c) Nils Anders Danielsson 2004-2011 -- License : See the file LICENCE. ----- Maintainer : http://www.cs.nott.ac.uk/~nad/+-- Maintainer : http://www.cse.chalmers.se/~nad/ -- Stability : experimental -- Portability : non-portable (GHC-specific) --
Test/ChasingBottoms/ContinuousFunctions.hs view
@@ -12,10 +12,10 @@ -- | -- Module : Test.ChasingBottoms.ContinuousFunctions--- Copyright : (c) Nils Anders Danielsson 2005-2010+-- Copyright : (c) Nils Anders Danielsson 2005-2011 -- License : See the file LICENCE. ----- Maintainer : http://www.cs.nott.ac.uk/~nad/+-- Maintainer : http://www.cse.chalmers.se/~nad/ -- Stability : experimental -- Portability : non-portable (GHC-specific) --@@ -214,7 +214,7 @@ -- These functions provided inspiration for the generic one below. matchFlat :: CoArbitrary a => MakePM a-matchFlat a = PatternMatch { apply = coarbitrary a, more = empty }+matchFlat a = PatternMatch { apply = coarbitrary a, more = Seq.empty } data Tree a = Branch (Tree a) (Tree a)@@ -246,7 +246,7 @@ CharConstr s -> nonBottomError "match: Encountered CharConstr." more :: forall a. Data a => a -> Seq PatternMatch- more = gmapQr (<|) empty match+ more = gmapQr (<|) Seq.empty match ------------------------------------------------------------------------ -- MakeResult monad@@ -320,7 +320,7 @@ -- | Concatenates arguments. concat :: Seq (Seq a) -> Seq a-concat = Seq.foldr (><) empty+concat = Seq.foldr (><) Seq.empty -- | Composes arguments. @@ -333,7 +333,7 @@ partition' :: Int -> Seq a -> Gen (Seq a, Seq a) partition' freq ss = case viewl ss of- EmptyL -> return (empty, empty)+ EmptyL -> return (Seq.empty, Seq.empty) x :< xs -> do (ys, zs) <- partition' freq xs frequency [ (1, return (x <| ys, zs))
Test/ChasingBottoms/ContinuousFunctions/Tests.hs view
@@ -79,8 +79,8 @@ unless ok $ putStrLn msg return ok where- apply test (Success labels) = test labels- apply _ _ = (False, "Test failed.")+ apply test Success{labels = labels} = test labels+ apply _ _ = (False, "Test failed.") spread labels = (uniqueShare >= 3%4, "uniqueShare: " ++ show uniqueShare) where
Test/ChasingBottoms/IsBottom.hs view
@@ -2,10 +2,10 @@ -- | -- Module : Test.ChasingBottoms.IsBottom--- Copyright : (c) Nils Anders Danielsson 2004-2010+-- Copyright : (c) Nils Anders Danielsson 2004-2011 -- License : See the file LICENCE. ----- Maintainer : http://www.cs.nott.ac.uk/~nad/+-- Maintainer : http://www.cse.chalmers.se/~nad/ -- Stability : experimental -- Portability : non-portable (exceptions) --
Test/ChasingBottoms/IsType.hs view
@@ -1,9 +1,9 @@ -- | -- Module : Test.ChasingBottoms.IsType--- Copyright : (c) Nils Anders Danielsson 2004-2010+-- Copyright : (c) Nils Anders Danielsson 2004-2011 -- License : See the file LICENCE. ----- Maintainer : http://www.cs.nott.ac.uk/~nad/+-- Maintainer : http://www.cse.chalmers.se/~nad/ -- Stability : experimental -- Portability : non-portable (GHC-specific) --
Test/ChasingBottoms/Nat.hs view
@@ -2,10 +2,10 @@ -- | -- Module : Test.ChasingBottoms.Nat--- Copyright : (c) Nils Anders Danielsson 2004-2010+-- Copyright : (c) Nils Anders Danielsson 2004-2011 -- License : See the file LICENCE. ----- Maintainer : http://www.cs.nott.ac.uk/~nad/+-- Maintainer : http://www.cse.chalmers.se/~nad/ -- Stability : experimental -- Portability : non-portable (GHC-specific) --
Test/ChasingBottoms/SemanticOrd.hs view
@@ -3,10 +3,10 @@ -- | -- Module : Test.ChasingBottoms.SemanticOrd--- Copyright : (c) Nils Anders Danielsson 2004-2010+-- Copyright : (c) Nils Anders Danielsson 2004-2011 -- License : See the file LICENCE. ----- Maintainer : http://www.cs.nott.ac.uk/~nad/+-- Maintainer : http://www.cse.chalmers.se/~nad/ -- Stability : experimental -- Portability : non-portable (GHC-specific) --
Test/ChasingBottoms/TimeOut.hs view
@@ -2,10 +2,10 @@ -- | -- Module : Test.ChasingBottoms.TimeOut--- Copyright : (c) Nils Anders Danielsson 2004-2010+-- Copyright : (c) Nils Anders Danielsson 2004-2011 -- License : See the file LICENCE. ----- Maintainer : http://www.cs.nott.ac.uk/~nad/+-- Maintainer : http://www.cse.chalmers.se/~nad/ -- Stability : experimental -- Portability : non-portable (preemptive scheduling) --