opentheory-primitive 1.1 → 1.2
raw patch · 7 files changed
+26/−11 lines, 7 files
Files
- opentheory-primitive.cabal +3/−3
- src/OpenTheory/Primitive/Byte.hs +1/−1
- src/OpenTheory/Primitive/Natural.hs +1/−1
- src/OpenTheory/Primitive/Random.hs +1/−1
- src/OpenTheory/Primitive/Test.hs +13/−2
- src/OpenTheory/Primitive/Word16.hs +1/−1
- testsrc/Test.hs +6/−2
opentheory-primitive.cabal view
@@ -1,13 +1,13 @@ name: opentheory-primitive-version: 1.1+version: 1.2 category: Formal Methods synopsis: Haskell primitives used by OpenTheory packages license: MIT license-file: LICENSE cabal-version: >= 1.8.0.6 build-type: Simple-author: Joe Hurd <joe@gilith.com>-maintainer: Joe Hurd <joe@gilith.com>+author: Joe Leslie-Hurd <joe@gilith.com>+maintainer: Joe Leslie-Hurd <joe@gilith.com> description: The types and values defined in this package extend those in the Prelude to provide the core execution platform assumed by Haskell
src/OpenTheory/Primitive/Byte.hs view
@@ -3,7 +3,7 @@ description: Primitive byte functions license: MIT -maintainer: Joe Hurd <joe@gilith.com>+maintainer: Joe Leslie-Hurd <joe@gilith.com> stability: provisional portability: portable -}
src/OpenTheory/Primitive/Natural.hs view
@@ -3,7 +3,7 @@ description: Primitive natural number functions license: MIT -maintainer: Joe Hurd <joe@gilith.com>+maintainer: Joe Leslie-Hurd <joe@gilith.com> stability: provisional portability: portable -}
src/OpenTheory/Primitive/Random.hs view
@@ -3,7 +3,7 @@ description: Primitive random bit-stream functions license: MIT -maintainer: Joe Hurd <joe@gilith.com>+maintainer: Joe Leslie-Hurd <joe@gilith.com> stability: provisional portability: portable -}
src/OpenTheory/Primitive/Test.hs view
@@ -3,15 +3,26 @@ description: OpenTheory QuickCheck interface license: MIT -maintainer: Joe Hurd <joe@gilith.com>+maintainer: Joe Leslie-Hurd <joe@gilith.com> stability: provisional portability: portable -} module OpenTheory.Primitive.Test- ( check )+ ( assert,+ check ) where import Test.QuickCheck++assert :: String -> Bool -> IO ()+assert desc prop =+ do putStr desc+ if prop+ then putStrLn "+++ OK"+ else+ do putStr "**"+ putStrLn "* Failed!"+ error "Assertion failed" checkArgs :: Test.QuickCheck.Args checkArgs = Test.QuickCheck.stdArgs { maxSuccess = 100 }
src/OpenTheory/Primitive/Word16.hs view
@@ -3,7 +3,7 @@ description: Primitive 16-bit word functions license: MIT -maintainer: Joe Hurd <joe@gilith.com>+maintainer: Joe Leslie-Hurd <joe@gilith.com> stability: provisional portability: portable -}
testsrc/Test.hs view
@@ -3,7 +3,7 @@ Description: OpenTheory QuickCheck interface License: MIT -Maintainer: Joe Hurd <joe@gilith.com>+Maintainer: Joe Leslie-Hurd <joe@gilith.com> Stability: provisional Portability: portable @@ -16,6 +16,9 @@ import qualified OpenTheory.Primitive.Random as Primitive.Random import qualified OpenTheory.Primitive.Test as Primitive.Test +assertion0 :: Bool+assertion0 = True+ proposition0 :: Primitive.Random.Random -> Bool proposition0 r = let (p,_) = Primitive.Random.bit r in@@ -23,5 +26,6 @@ main :: IO () main =- do Primitive.Test.check "Proposition 0:\n !p. p \\/ ~p\n " proposition0+ do Primitive.Test.assert "Assertion 0:\n T\n " assertion0+ Primitive.Test.check "Proposition 0:\n !p. p \\/ ~p\n " proposition0 return ()