packages feed

lazysmallcheck 0.5 → 0.6

raw patch · 3 files changed

+7/−14 lines, 3 filesdep −haskell98dep ~base

Dependencies removed: haskell98

Dependency ranges changed: base

Files

Test/LazySmallCheck.hs view
@@ -33,7 +33,7 @@   )   where -import Monad+import Control.Monad import Control.Exception import System.Exit 
Test/LazySmallCheck/Generic.hs view
@@ -2,12 +2,6 @@ 
 {- | This module is highly experimental! -}
 
-{-
-It seems that in GHC 6.11 StringRep has been renamed CharRep.
-Please rename the two occurences StringRep if using GHC >= 6.11.
-Thanks to David Duke for this.
--}
-
 module Test.LazySmallCheck.Generic
   ( depthCheck  -- :: (Data a, Show a) => Int -> (a -> Bool) -> IO [a]
   , (==>)       -- :: Bool -> Bool -> Bool
@@ -49,9 +43,9 @@                                  if   ncon == 0
                                  then Just x'
                                  else Nothing) xs'
-         IntRep -> mkPrim dt (mkIntConstr dt . toInteger)
+         IntRep -> mkPrim dt (mkIntegralConstr dt . toInteger)
                              [-depleft .. depleft]
-         StringRep -> mkPrim dt (mkStringConstr dt . (:[]))
+         CharRep -> mkPrim dt (mkCharConstr dt)
                                 (take (depleft+1) ['a' .. 'z'])
          _ -> error $ "LazySmallCheck.Generic: Can't generate type "
                    ++ dataTypeName dt
@@ -98,8 +92,8 @@      cons' :: [Constr]
      cons' = case dataTypeRep ty of
               AlgRep cons -> cons
-              IntRep      -> map (mkIntConstr ty . toInteger) [-d .. d]
-              StringRep   -> map (mkStringConstr ty . (:[])) (take d ['a'..'z'])
+              IntRep      -> map (mkIntegralConstr ty . toInteger) [-d .. d]
+              CharRep     -> map (mkCharConstr ty) (take d ['a'..'z'])
               --FloatRep  ->
       where
         ty = dataTypeOf (head result)     
lazysmallcheck.cabal view
@@ -1,8 +1,8 @@ Name:               lazysmallcheck-Version:            0.5+Version:            0.6 Maintainer:         Matthew Naylor <mfn@cs.york.ac.uk> Homepage:           http://www.cs.york.ac.uk/~mfn/lazysmallcheck/-Build-Depends:      base < 5, haskell98+Build-Depends:      base < 5 License:            BSD3 License-File:       LICENSE Author:             Matthew Naylor and Fredrik Lindblad@@ -16,7 +16,6 @@   significantly fewer test-cases to verify a property for all inputs up    to a given depth. Category:           Testing-Build-Depends:      base, haskell98 Build-Type:         Simple Extra-Source-Files:   examples/Catch.hs