From ed5fa534b401bc31e8408659a78baa23c57cd52e Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 8 Mar 2008 17:04:50 +0000 Subject: [PATCH] [gitconv @ Properties.hs: simplify arbitrary instance for IntegralString] --- tests/Properties.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/Properties.hs b/tests/Properties.hs index 8dd6471..a4450b8 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -52,11 +52,7 @@ newtype IntegralString = IS String deriving Show instance Arbitrary IntegralString where - arbitrary = do - xs <- sized $ \n -> replicateM (n `min` 15) $ - oneof (map return ['0'..'9']) - neg <- oneof [return True, return False] - return $ IS (if neg then '-':xs else xs) + arbitrary = fmap (IS . show) (arbitrary :: Gen Integer) newtype BoolString = BS String deriving Show -- 2.11.4.GIT