ChasingBottoms 1.3.0.12 → 1.3.0.13
raw patch · 1 files changed
+37/−37 lines, 1 filesdep ~sybPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: syb
API changes (from Hackage documentation)
Files
- ChasingBottoms.cabal +37/−37
ChasingBottoms.cabal view
@@ -1,5 +1,5 @@ name: ChasingBottoms-version: 1.3.0.12+version: 1.3.0.13 license: MIT license-file: LICENCE copyright: Copyright (c) Nils Anders Danielsson 2004-2015.@@ -20,47 +20,47 @@ . Testing explicitly for bottoms: .- >> isBottom (head [])- >True+ > > isBottom (head [])+ > True .- >> isBottom bottom- >True+ > > isBottom bottom+ > True .- >> isBottom (\_ -> bottom)- >False+ > > isBottom (\_ -> bottom)+ > False .- >> isBottom (bottom, bottom)- >False+ > > isBottom (bottom, bottom)+ > False . Comparing finite, partial values: .- >> ((bottom, 3) :: (Bool, Int)) ==! (bottom, 2+5-4)- >True+ > > ((bottom, 3) :: (Bool, Int)) ==! (bottom, 2+5-4)+ > True .- >> ((bottom, bottom) :: (Bool, Int)) <! (bottom, 8)- >True+ > > ((bottom, bottom) :: (Bool, Int)) <! (bottom, 8)+ > True . Showing partial and infinite values (@\\\/!@ is join and @\/\\!@ is meet): .- >> approxShow 4 $ (True, bottom) \/! (bottom, 'b')- >"Just (True, 'b')"+ > > approxShow 4 $ (True, bottom) \/! (bottom, 'b')+ > "Just (True, 'b')" .- >> approxShow 4 $ (True, bottom) /\! (bottom, 'b')- >"(_|_, _|_)"+ > > approxShow 4 $ (True, bottom) /\! (bottom, 'b')+ > "(_|_, _|_)" .- >> approxShow 4 $ ([1..] :: [Int])- >"[1, 2, 3, _"+ > > approxShow 4 $ ([1..] :: [Int])+ > "[1, 2, 3, _" .- >> approxShow 4 $ (cycle [bottom] :: [Bool])- >"[_|_, _|_, _|_, _"+ > > approxShow 4 $ (cycle [bottom] :: [Bool])+ > "[_|_, _|_, _|_, _" . Approximately comparing infinite, partial values: .- >> approx 100 [2,4..] ==! approx 100 (filter even [1..] :: [Int])- >True+ > > approx 100 [2,4..] ==! approx 100 (filter even [1..] :: [Int])+ > True .- >> approx 100 [2,4..] /=! approx 100 (filter even [bottom..] :: [Int])- >True+ > > approx 100 [2,4..] /=! approx 100 (filter even [bottom..] :: [Int])+ > True . The code above relies on the fact that @bottom@, just as @error \"...\"@, @undefined@ and pattern match failures, yield@@ -68,11 +68,11 @@ computations, such as the following example, and then it can be nice to be able to apply a time-out: .- >> timeOut' 1 (reverse [1..5])- >Value [5,4,3,2,1]+ > > timeOut' 1 (reverse [1..5])+ > Value [5,4,3,2,1] .- >> timeOut' 1 (reverse [1..])- >NonTermination+ > > timeOut' 1 (reverse [1..])+ > NonTermination . The time-out functionality can be used to treat \"slow\" computations as bottoms:@@ -99,12 +99,12 @@ . Timeouts can also be applied to @IO@ computations: .- >> let primes () = unfoldr (\(x:xs) -> Just (x, filter ((/= 0) . (`mod` x)) xs)) [2..]- >> timeOutMicro 100 (print $ primes ())- >[2,NonTermination- >> timeOutMicro 10000 (print $ take 10 $ primes ())- >[2,3,5,7,11,13,17,19,23,29]- >Value ()+ > > let primes () = unfoldr (\(x:xs) -> Just (x, filter ((/= 0) . (`mod` x)) xs)) [2..]+ > > timeOutMicro 100 (print $ primes ())+ > [2,NonTermination+ > > timeOutMicro 10000 (print $ take 10 $ primes ())+ > [2,3,5,7,11,13,17,19,23,29]+ > Value () . For the underlying theory and a larger example involving use of QuickCheck, see the article \"Chasing Bottoms, A Case Study in Program@@ -143,7 +143,7 @@ base >= 4.0 && < 4.9, containers >= 0.3 && < 0.6, random >= 1.0 && < 1.2,- syb >= 0.1.0.2 && < 0.5+ syb >= 0.1.0.2 && < 0.6 test-suite ChasingBottomsTestSuite type: exitcode-stdio-1.0@@ -166,5 +166,5 @@ base >= 4.0 && < 4.9, containers >= 0.3 && < 0.6, random >= 1.0 && < 1.2,- syb >= 0.1.0.2 && < 0.5,+ syb >= 0.1.0.2 && < 0.6, array >= 0.3 && < 0.6