packages feed

rainbow-tests 0.14.0.2 → 0.16.0.0

raw patch · 34 files changed

+249/−398 lines, 34 filesdep +barecheckdep ~rainbowPVP ok

version bump matches the API change (PVP)

Dependencies added: barecheck

Dependency ranges changed: rainbow

API changes (from Hackage documentation)

- Data.Monoid.Coarbitrary: last :: (a -> Gen b -> Gen b) -> Last a -> Gen b -> Gen b
- Data.Monoid.Generators: last :: Gen a -> Gen (Last a)
- Data.Monoid.Shrinkers: last :: (a -> [a]) -> Last a -> [Last a]
- Data.Text.Coarbitrary: text :: Text -> Gen b -> Gen b
- Data.Text.Generators: text :: Gen Char -> Gen Text
- Data.Text.Shrinkers: text :: (Char -> [Char]) -> Text -> [Text]
- Rainbow.Tests.Util: coarbitraryList :: (a -> Gen b -> Gen b) -> [a] -> Gen b -> Gen b
- Rainbow.Tests.Util: shrink2 :: (a -> [a]) -> (b -> [b]) -> (a, b) -> [(a, b)]
- Rainbow.Tests.Util: shrink3 :: (a -> [a]) -> (b -> [b]) -> (c -> [c]) -> (a, b, c) -> [(a, b, c)]
- Rainbow.Tests.Util: shrink4 :: (a -> [a]) -> (b -> [b]) -> (c -> [c]) -> (d -> [d]) -> (a, b, c, d) -> [(a, b, c, d)]
- Rainbow.Tests.Util: shrink5 :: (a -> [a]) -> (b -> [b]) -> (c -> [c]) -> (d -> [d]) -> (e -> [e]) -> (a, b, c, d, e) -> [(a, b, c, d, e)]
- System.Console.Rainbow.Colors.Coarbitrary: color256 :: Color256 -> Gen b -> Gen b
- System.Console.Rainbow.Colors.Coarbitrary: color8 :: Color8 -> Gen b -> Gen b
- System.Console.Rainbow.Colors.Generators: color256 :: Gen Color256
- System.Console.Rainbow.Colors.Generators: color8 :: Gen Color8
- System.Console.Rainbow.Colors.Shrinkers: color256 :: Color256 -> [Color256]
- System.Console.Rainbow.Colors.Shrinkers: color256Named :: [Color256]
- System.Console.Rainbow.Colors.Shrinkers: color8 :: Color8 -> [Color8]
- System.Console.Rainbow.Colors.Shrinkers: color8Named :: [Color8]
- System.Console.Rainbow.Types.Coarbitrary: chunk :: Chunk -> Gen b -> Gen b
- System.Console.Rainbow.Types.Coarbitrary: style256 :: Style256 -> Gen b -> Gen b
- System.Console.Rainbow.Types.Coarbitrary: style8 :: Style8 -> Gen b -> Gen b
- System.Console.Rainbow.Types.Coarbitrary: styleCommon :: StyleCommon -> Gen b -> Gen b
- System.Console.Rainbow.Types.Coarbitrary: textSpec :: TextSpec -> Gen b -> Gen b
- System.Console.Rainbow.Types.Generators: chunk :: Gen Chunk
- System.Console.Rainbow.Types.Generators: style256 :: Gen Style256
- System.Console.Rainbow.Types.Generators: style8 :: Gen Style8
- System.Console.Rainbow.Types.Generators: styleCommon :: Gen StyleCommon
- System.Console.Rainbow.Types.Generators: textSpec :: Gen TextSpec
- System.Console.Rainbow.Types.Shrinkers: chunk :: Chunk -> [Chunk]
- System.Console.Rainbow.Types.Shrinkers: style256 :: Style256 -> [Style256]
- System.Console.Rainbow.Types.Shrinkers: style8 :: Style8 -> [Style8]
- System.Console.Rainbow.Types.Shrinkers: styleCommon :: StyleCommon -> [StyleCommon]
- System.Console.Rainbow.Types.Shrinkers: textSpec :: TextSpec -> [TextSpec]
- System.Console.Terminfo.Color.Coarbitrary: color :: Color -> Gen b -> Gen b
- System.Console.Terminfo.Color.Generators: allColors :: [Color]
- System.Console.Terminfo.Color.Generators: basicColors :: [Color]
- System.Console.Terminfo.Color.Generators: color :: Gen Color
- System.Console.Terminfo.Color.Shrinkers: color :: Color -> [Color]
+ Rainbow.Colors.Coarbitrary: both :: Both -> Gen b -> Gen b
+ Rainbow.Colors.Generators: both :: Gen Both
+ Rainbow.Colors.Shrinkers: both :: Both -> [Both]
+ Rainbow.Types.Coarbitrary: chunk :: Chunk -> Gen b -> Gen b
+ Rainbow.Types.Coarbitrary: color256 :: Color256 -> Gen b -> Gen b
+ Rainbow.Types.Coarbitrary: color8 :: Color8 -> Gen b -> Gen b
+ Rainbow.Types.Coarbitrary: enum8 :: Enum8 -> Gen b -> Gen b
+ Rainbow.Types.Coarbitrary: style256 :: Style256 -> Gen b -> Gen b
+ Rainbow.Types.Coarbitrary: style8 :: Style8 -> Gen b -> Gen b
+ Rainbow.Types.Coarbitrary: styleCommon :: StyleCommon -> Gen b -> Gen b
+ Rainbow.Types.Coarbitrary: textSpec :: TextSpec -> Gen b -> Gen b
+ Rainbow.Types.Generators: background256 :: Gen Background256
+ Rainbow.Types.Generators: background8 :: Gen Background8
+ Rainbow.Types.Generators: chunk :: Gen Chunk
+ Rainbow.Types.Generators: color256 :: Gen Color256
+ Rainbow.Types.Generators: color8 :: Gen Color8
+ Rainbow.Types.Generators: enum8 :: Gen Enum8
+ Rainbow.Types.Generators: foreground256 :: Gen Foreground256
+ Rainbow.Types.Generators: foreground8 :: Gen Foreground8
+ Rainbow.Types.Generators: style256 :: Gen Style256
+ Rainbow.Types.Generators: style8 :: Gen Style8
+ Rainbow.Types.Generators: styleCommon :: Gen StyleCommon
+ Rainbow.Types.Generators: textSpec :: Gen TextSpec
+ Rainbow.Types.Shrinkers: chunk :: Chunk -> [Chunk]
+ Rainbow.Types.Shrinkers: color256 :: Color256 -> [Color256]
+ Rainbow.Types.Shrinkers: color8 :: Color8 -> [Color8]
+ Rainbow.Types.Shrinkers: enum8 :: Enum8 -> [Enum8]
+ Rainbow.Types.Shrinkers: style256 :: Style256 -> [Style256]
+ Rainbow.Types.Shrinkers: style8 :: Style8 -> [Style8]
+ Rainbow.Types.Shrinkers: styleCommon :: StyleCommon -> [StyleCommon]
+ Rainbow.Types.Shrinkers: textSpec :: TextSpec -> [TextSpec]

Files

changelog view
@@ -1,3 +1,7 @@+0.16.0.0+  * overhauled how colors are stored; much simpler now.  However+    these changes will break old code.+ 0.14.0.2   * Change dependency bounds   * Change cabal generator to cartel
current-versions.txt view
@@ -1,14 +1,14 @@ This package was tested to work with these dependency versions and compiler version. These are the default versions fetched by cabal install.-Tested as of: 2014-07-13 15:21:37.859452 UTC-Path to compiler: ghc-7.8.2-Compiler description: 7.8.2+Tested as of: 2014-08-12 01:34:46.415423 UTC+Path to compiler: ghc-7.8.3+Compiler description: 7.8.3 -/opt/ghc/7.8.2/lib/ghc-7.8.2/package.conf.d:+/opt/ghc/7.8.3/lib/ghc-7.8.3/package.conf.d:     Cabal-1.18.1.3     array-0.5.0.0-    base-4.7.0.0+    base-4.7.0.1     bin-package-db-0.0.0.0     binary-0.7.1.0     rts-1.0@@ -17,8 +17,9 @@     deepseq-1.3.0.2     directory-1.2.1.0     filepath-1.3.0.2-    (ghc-7.8.2)+    (ghc-7.8.3)     ghc-prim-0.3.1.0+    haskeline-0.7.1.2     (haskell2010-1.1.2.0)     (haskell98-2.0.0.3)     hoopl-3.10.0.1@@ -29,17 +30,19 @@     pretty-1.1.1.1     process-1.2.0.0     template-haskell-2.9.0.0+    terminfo-0.4.0.0     time-1.4.2     transformers-0.3.0.0     unix-2.7.0.1+    xhtml-3000.2.1 -/home/massysett/rainbow/tests/sunlight-5537/db:-    QuickCheck-2.7.5+/home/massysett/rainbow/tests/sunlight-1087/db:+    QuickCheck-2.7.6+    barecheck-0.2.0.0     primitive-0.5.3.0-    rainbow-0.14.0.2-    rainbow-tests-0.14.0.2+    rainbow-0.16.0.0+    rainbow-tests-0.16.0.0     random-1.0.1.1-    terminfo-0.4.0.0     text-1.1.1.3     tf-random-0.5 
genCabal.hs view
@@ -45,6 +45,7 @@     , text     , rainbow     , quickcheck+    , barecheck     ]   ] 
− lib/Data/Monoid/Coarbitrary.hs
@@ -1,9 +0,0 @@-module Data.Monoid.Coarbitrary where--import Test.QuickCheck-import qualified Data.Monoid as O--last :: (a -> Gen b -> Gen b) -> O.Last a -> Gen b -> Gen b-last f (O.Last m) = case m of-  Nothing -> variant (0 :: Int)-  Just a -> variant (1 :: Int) . f a
− lib/Data/Monoid/Generators.hs
@@ -1,8 +0,0 @@-module Data.Monoid.Generators where--import qualified Data.Monoid as O-import Test.QuickCheck--last :: Gen a -> Gen (O.Last a)-last g = fmap O.Last $ frequency-  [ (3, fmap Just g), (1, return Nothing) ]
− lib/Data/Monoid/Shrinkers.hs
@@ -1,8 +0,0 @@-module Data.Monoid.Shrinkers where--import qualified Data.Monoid as O--last :: (a -> [a]) -> O.Last a -> [O.Last a]-last f (O.Last l) = case l of-  Nothing -> []-  Just a -> map O.Last $ Nothing : [Just x | x <- f a]
− lib/Data/Text/Coarbitrary.hs
@@ -1,8 +0,0 @@-module Data.Text.Coarbitrary where--import Test.QuickCheck-import Data.Text (Text)-import qualified Data.Text as X--text :: Text -> Gen b -> Gen b-text = coarbitrary . X.unpack
− lib/Data/Text/Generators.hs
@@ -1,9 +0,0 @@-module Data.Text.Generators where--import Test.QuickCheck-import qualified Data.Text as X-import Data.Text (Text)--text :: Gen Char -> Gen Text-text = fmap X.pack . listOf-
− lib/Data/Text/Shrinkers.hs
@@ -1,8 +0,0 @@-module Data.Text.Shrinkers where--import Data.Text (Text)-import qualified Data.Text as X-import Test.QuickCheck--text :: (Char -> [Char]) -> Text -> [Text]-text f = map X.pack . shrinkList f . X.unpack
+ lib/Rainbow/Coarbitrary.hs view
@@ -0,0 +1,7 @@+module Rainbow.Coarbitrary+  ( module Rainbow.Types.Coarbitrary+  , module Rainbow.Colors.Coarbitrary+  ) where++import Rainbow.Types.Coarbitrary+import Rainbow.Colors.Coarbitrary
+ lib/Rainbow/Colors/Coarbitrary.hs view
@@ -0,0 +1,9 @@+module Rainbow.Colors.Coarbitrary where++import Test.QuickCheck+import Rainbow.Colors+import Rainbow.Types.Coarbitrary++both :: Both -> Gen b -> Gen b+both (Both c) = color8 c+
+ lib/Rainbow/Colors/Generators.hs view
@@ -0,0 +1,8 @@+module Rainbow.Colors.Generators where++import qualified Rainbow.Colors as C+import Test.QuickCheck+import qualified Rainbow.Types.Generators as G++both :: Gen C.Both+both = fmap C.Both G.color8
+ lib/Rainbow/Colors/Shrinkers.hs view
@@ -0,0 +1,7 @@+module Rainbow.Colors.Shrinkers where++import qualified Rainbow.Colors as C+import qualified Rainbow.Types.Shrinkers as S++both :: C.Both -> [C.Both]+both (C.Both b) = map C.Both $ S.color8 b
+ lib/Rainbow/Generators.hs view
@@ -0,0 +1,7 @@+module Rainbow.Generators+  ( module Rainbow.Types.Generators+  , module Rainbow.Colors.Generators+  ) where++import Rainbow.Types.Generators+import Rainbow.Colors.Generators
+ lib/Rainbow/Shrinkers.hs view
@@ -0,0 +1,7 @@+module Rainbow.Shrinkers+  ( module Rainbow.Types.Shrinkers+  , module Rainbow.Colors.Shrinkers+  ) where++import Rainbow.Types.Shrinkers+import Rainbow.Colors.Shrinkers
− lib/Rainbow/Tests/Util.hs
@@ -1,52 +0,0 @@-module Rainbow.Tests.Util where--import Test.QuickCheck--shrink2 :: (a -> [a]) -> (b -> [b]) -> (a, b) -> [(a, b)]-shrink2 fa fb (a, b) =-     [ (a', b) | a' <- fa a ]-  ++ [ (a, b') | b' <- fb b ]--shrink3-  :: (a -> [a])-  -> (b -> [b])-  -> (c -> [c])-  -> (a, b, c)-  -> [(a, b, c)]-shrink3 fa fb fc (a, b, c) =-  [ (a', b', c') | (a', (b', c'))-    <- shrink2 fa (shrink2 fb fc) (a, (b, c)) ]--shrink4-  :: (a -> [a])-  -> (b -> [b])-  -> (c -> [c])-  -> (d -> [d])-  -> (a, b, c, d)-  -> [(a, b, c, d)]-shrink4 fa fb fc fd (a, b, c, d) =-  [ (a', b', c', d') | (a', (b', (c', d')))-    <- shrink2 fa (shrink2 fb (shrink2 fc fd)) (a, (b, (c, d))) ]--shrink5-  :: (a -> [a])-  -> (b -> [b])-  -> (c -> [c])-  -> (d -> [d])-  -> (e -> [e])-  -> (a, b, c, d, e)-  -> [(a, b, c, d, e)]-shrink5 fa fb fc fd fe (a, b, c, d, e) =-  [ (a', b', c', d', e') | (a', (b', (c', (d', e'))))-    <- shrink2 fa (shrink2 fb (shrink2 fc (shrink2 fd fe)))-                  (a, (b, (c, (d, e)))) ]--coarbitraryList-  :: (a -> Gen b -> Gen b)-  -> [a]-  -> Gen b-  -> Gen b-coarbitraryList f xs = case xs of-  [] -> variant (0 :: Int)-  a:as -> variant (1 :: Int) . f a . coarbitraryList f as-
+ lib/Rainbow/Types/Coarbitrary.hs view
@@ -0,0 +1,55 @@+module Rainbow.Types.Coarbitrary where++import Test.QuickCheck+import Data.Monoid.Coarbitrary+import Data.Text.Coarbitrary+import qualified Rainbow.Types as T+import Prelude hiding (last, maybe)+import Barecheck.Util+import Prelude.Coarbitrary++enum8 :: T.Enum8 -> Gen b -> Gen b+enum8 e = case e of+  T.E0 -> varInt 0+  T.E1 -> varInt 1+  T.E2 -> varInt 2+  T.E3 -> varInt 3+  T.E4 -> varInt 4+  T.E5 -> varInt 5+  T.E6 -> varInt 6+  T.E7 -> varInt 7++color8 :: T.Color8 -> Gen b -> Gen b+color8 (T.Color8 me) = maybe enum8 me++color256 :: T.Color256 -> Gen b -> Gen b+color256 (T.Color256 me) = maybe variant me++styleCommon :: T.StyleCommon -> Gen b -> Gen b+styleCommon c+  = last coarbitrary (T.scBold c)+  . last coarbitrary (T.scUnderline c)+  . last coarbitrary (T.scFlash c)+  . last coarbitrary (T.scInverse c)++style8 :: T.Style8 -> Gen b -> Gen b+style8 c+  = last color8 (T.foreground8 c)+  . last color8 (T.background8 c)+  . styleCommon (T.common8 c)++style256 :: T.Style256 -> Gen b -> Gen b+style256 c+  = last color256 (T.foreground256 c)+  . last color256 (T.background256 c)+  . styleCommon (T.common256 c)++textSpec :: T.TextSpec -> Gen b -> Gen b+textSpec c+  = style8 (T.style8 c)+  . style256 (T.style256 c)++chunk :: T.Chunk -> Gen b -> Gen b+chunk c+  = textSpec (T.textSpec c)+  . list text (T.text c)
+ lib/Rainbow/Types/Generators.hs view
@@ -0,0 +1,52 @@+module Rainbow.Types.Generators where++import Data.Monoid.Generators+import qualified Rainbow.Types as T+import Test.QuickCheck+import Control.Monad+import Data.Text.Generators+import Prelude.Generators+import Prelude hiding (last, maybe)+++enum8 :: Gen T.Enum8+enum8 = elements [minBound..maxBound]++color8 :: Gen T.Color8+color8 = fmap T.Color8 $ maybe enum8++color256 :: Gen T.Color256+color256 = fmap T.Color256 $ maybe (elements [minBound..maxBound])++background8 :: Gen T.Background8+background8 = last color8++background256 :: Gen T.Background256+background256 = last color256++foreground8 :: Gen T.Foreground8+foreground8 = last color8++foreground256 :: Gen T.Foreground256+foreground256 = last color256++styleCommon :: Gen T.StyleCommon+styleCommon = liftM4 T.StyleCommon g g g g+  where+    g = last arbitrary++style8 :: Gen T.Style8+style8 = liftM3 T.Style8 g g styleCommon+  where+    g = last color8++style256 :: Gen T.Style256+style256 = liftM3 T.Style256 g g styleCommon+  where+    g = last color256++textSpec :: Gen T.TextSpec+textSpec = liftM2 T.TextSpec style8 style256++chunk :: Gen T.Chunk+chunk = liftM2 T.Chunk textSpec (listOf (text arbitrary))
+ lib/Rainbow/Types/Shrinkers.hs view
@@ -0,0 +1,59 @@+module Rainbow.Types.Shrinkers where++import Data.Text.Shrinkers+import Data.Monoid.Shrinkers+import Test.QuickCheck+import qualified Rainbow.Types as T+import Prelude hiding (last)+import Prelude.Shrinkers++enum8 :: T.Enum8 -> [T.Enum8]+enum8 e = case e of+  T.E0 -> []+  T.E1 -> [T.E0]+  T.E2 -> [T.E0, T.E1]+  T.E3 -> [T.E0, T.E1, T.E2]+  T.E4 -> [T.E0, T.E1, T.E2, T.E3]+  T.E5 -> [T.E0, T.E1, T.E2, T.E3, T.E4]+  T.E6 -> [T.E0, T.E1, T.E2, T.E3, T.E4, T.E5]+  T.E7 -> [T.E0, T.E1, T.E2, T.E3, T.E4, T.E5, T.E6]++color8 :: T.Color8 -> [T.Color8]+color8 (T.Color8 me) = case me of+  Nothing -> []+  Just e -> map T.Color8 $ Nothing : map Just (enum8 e)++color256 :: T.Color256 -> [T.Color256]+color256 (T.Color256 me) = case me of+  Nothing -> []+  Just e -> map T.Color256 $ Nothing : map Just (shrinkIntegral e)++styleCommon :: T.StyleCommon -> [T.StyleCommon]+styleCommon (T.StyleCommon a b c d) =+  [ T.StyleCommon a' b' c' d'+    | (a', b', c', d') <- tuple4 s s s s (a, b, c, d) ]+  where+    s = last shrink++style8 :: T.Style8 -> [T.Style8]+style8 (T.Style8 f8 b8 c) =+  [ T.Style8 f8' b8' c'+  | (f8', b8', c') <- tuple3 sc sc styleCommon (f8, b8, c) ]+  where+    sc = last color8++style256 :: T.Style256 -> [T.Style256]+style256 (T.Style256 f256 b256 c) =+  [ T.Style256 f256' b256' c'+  | (f256', b256', c') <- tuple3 sc sc styleCommon (f256, b256, c) ]+  where+    sc = last color256++textSpec :: T.TextSpec -> [T.TextSpec]+textSpec (T.TextSpec s8 s256) =+  [ T.TextSpec s8' s256'+  | (s8', s256') <- tuple2 style8 style256 (s8, s256) ]++chunk :: T.Chunk -> [T.Chunk]+chunk (T.Chunk t xs) = [T.Chunk t' xs'+  | (t', xs') <- tuple2 textSpec (shrinkList (text shrink)) (t, xs) ]
− lib/System/Console/Rainbow/Coarbitrary.hs
@@ -1,7 +0,0 @@-module System.Console.Rainbow.Coarbitrary-  ( module System.Console.Rainbow.Types.Coarbitrary-  , module System.Console.Rainbow.Colors.Coarbitrary-  ) where--import System.Console.Rainbow.Types.Coarbitrary-import System.Console.Rainbow.Colors.Coarbitrary
− lib/System/Console/Rainbow/Colors/Coarbitrary.hs
@@ -1,15 +0,0 @@-module System.Console.Rainbow.Colors.Coarbitrary where--import Test.QuickCheck-import System.Console.Terminfo.Color.Coarbitrary-import System.Console.Rainbow.Colors--color8 :: Color8 -> Gen b -> Gen b-color8 c = case unColor8 c of-  Nothing -> variant (0 :: Int)-  Just x -> variant (1 :: Int) . color x--color256 :: Color256 -> Gen b -> Gen b-color256 c = case unColor256 c of-  Nothing -> variant (0 :: Int)-  Just x -> variant (1 :: Int) . color x
− lib/System/Console/Rainbow/Colors/Generators.hs
@@ -1,10 +0,0 @@-module System.Console.Rainbow.Colors.Generators where--import qualified System.Console.Rainbow.Colors as C-import Test.QuickCheck--color8 :: Gen C.Color8-color8 = elements $ C.c8_default : map snd C.c8_all--color256 :: Gen C.Color256-color256 = elements $ C.c256_default : map snd C.c256_all
− lib/System/Console/Rainbow/Colors/Shrinkers.hs
@@ -1,54 +0,0 @@-module System.Console.Rainbow.Colors.Shrinkers where--import Test.QuickCheck-import qualified System.Console.Rainbow.Colors as C-import qualified System.Console.Terminfo.Color as TC--color8Named :: [C.Color8]-color8Named =-  [ C.c8_black-  , C.c8_red-  , C.c8_green-  , C.c8_yellow-  , C.c8_blue-  , C.c8_magenta-  , C.c8_cyan-  , C.c8_white-  ]--color256Named :: [C.Color256]-color256Named =-  [ C.c256_black-  , C.c256_red-  , C.c256_green-  , C.c256_yellow-  , C.c256_blue-  , C.c256_magenta-  , C.c256_cyan-  , C.c256_white-  ]--color8 :: C.Color8 -> [C.Color8]-color8 c = case C.unColor8 c of-  Nothing -> []-  Just t -> case t of-    TC.ColorNumber n -> C.c8_default : color8Named ++ rest-      where-        rest = map get . shrinkIntegral $ n-        get i = case lookup i C.c8_all of-          Nothing -> error "color8 shrink failed"-          Just x -> x-    _ -> [C.c8_default]--color256 :: C.Color256 -> [C.Color256]-color256 c = case C.unColor256 c of-  Nothing -> []-  Just t -> case t of-    TC.ColorNumber n -> C.c256_default : color256Named ++ rest-      where-        rest = map get . shrinkIntegral $ n-        get i = case lookup i C.c256_all of-          Nothing -> error "color256 shrink failed"-          Just x -> x-    _ -> [C.c256_default]-
− lib/System/Console/Rainbow/Generators.hs
@@ -1,7 +0,0 @@-module System.Console.Rainbow.Generators-  ( module System.Console.Rainbow.Types.Generators-  , module System.Console.Rainbow.Colors.Generators-  ) where--import System.Console.Rainbow.Types.Generators-import System.Console.Rainbow.Colors.Generators
− lib/System/Console/Rainbow/Shrinkers.hs
@@ -1,7 +0,0 @@-module System.Console.Rainbow.Shrinkers-  ( module System.Console.Rainbow.Types.Shrinkers-  , module System.Console.Rainbow.Colors.Shrinkers-  ) where--import System.Console.Rainbow.Types.Shrinkers-import System.Console.Rainbow.Colors.Shrinkers
− lib/System/Console/Rainbow/Types/Coarbitrary.hs
@@ -1,38 +0,0 @@-module System.Console.Rainbow.Types.Coarbitrary where--import Test.QuickCheck-import Data.Monoid.Coarbitrary-import Data.Text.Coarbitrary-import System.Console.Rainbow.Colors.Coarbitrary-import qualified System.Console.Rainbow.Types as T-import Rainbow.Tests.Util-import Prelude hiding (last)--styleCommon :: T.StyleCommon -> Gen b -> Gen b-styleCommon c-  = last coarbitrary (T.scBold c)-  . last coarbitrary (T.scUnderline c)-  . last coarbitrary (T.scFlash c)-  . last coarbitrary (T.scInverse c)--style8 :: T.Style8 -> Gen b -> Gen b-style8 c-  = last color8 (T.foreground8 c)-  . last color8 (T.background8 c)-  . styleCommon (T.common8 c)--style256 :: T.Style256 -> Gen b -> Gen b-style256 c-  = last color256 (T.foreground256 c)-  . last color256 (T.background256 c)-  . styleCommon (T.common256 c)--textSpec :: T.TextSpec -> Gen b -> Gen b-textSpec c-  = style8 (T.style8 c)-  . style256 (T.style256 c)--chunk :: T.Chunk -> Gen b -> Gen b-chunk c-  = textSpec (T.textSpec c)-  . coarbitraryList text (T.text c)
− lib/System/Console/Rainbow/Types/Generators.hs
@@ -1,30 +0,0 @@-module System.Console.Rainbow.Types.Generators where--import Data.Monoid.Generators-import qualified System.Console.Rainbow.Types as T-import System.Console.Rainbow.Colors.Generators-import Test.QuickCheck-import Control.Monad-import Data.Text.Generators-import Prelude ()--styleCommon :: Gen T.StyleCommon-styleCommon = liftM4 T.StyleCommon g g g g-  where-    g = last arbitrary--style8 :: Gen T.Style8-style8 = liftM3 T.Style8 g g styleCommon-  where-    g = last color8--style256 :: Gen T.Style256-style256 = liftM3 T.Style256 g g styleCommon-  where-    g = last color256--textSpec :: Gen T.TextSpec-textSpec = liftM2 T.TextSpec style8 style256--chunk :: Gen T.Chunk-chunk = liftM2 T.Chunk textSpec (listOf (text arbitrary))
− lib/System/Console/Rainbow/Types/Shrinkers.hs
@@ -1,39 +0,0 @@-module System.Console.Rainbow.Types.Shrinkers where--import Data.Text.Shrinkers-import Rainbow.Tests.Util-import Data.Monoid.Shrinkers-import System.Console.Rainbow.Colors.Shrinkers-import Test.QuickCheck-import qualified System.Console.Rainbow.Types as T-import Prelude ()--styleCommon :: T.StyleCommon -> [T.StyleCommon]-styleCommon (T.StyleCommon a b c d) =-  [ T.StyleCommon a' b' c' d'-    | (a', b', c', d') <- shrink4 s s s s (a, b, c, d) ]-  where-    s = last shrink--style8 :: T.Style8 -> [T.Style8]-style8 (T.Style8 f8 b8 c) =-  [ T.Style8 f8' b8' c'-  | (f8', b8', c') <- shrink3 sc sc styleCommon (f8, b8, c) ]-  where-    sc = last color8--style256 :: T.Style256 -> [T.Style256]-style256 (T.Style256 f256 b256 c) =-  [ T.Style256 f256' b256' c'-  | (f256', b256', c') <- shrink3 sc sc styleCommon (f256, b256, c) ]-  where-    sc = last color256--textSpec :: T.TextSpec -> [T.TextSpec]-textSpec (T.TextSpec s8 s256) =-  [ T.TextSpec s8' s256'-  | (s8', s256') <- shrink2 style8 style256 (s8, s256) ]--chunk :: T.Chunk -> [T.Chunk]-chunk (T.Chunk t xs) = [T.Chunk t' xs'-  | (t', xs') <- shrink2 textSpec (shrinkList (text shrink)) (t, xs) ]
− lib/System/Console/Terminfo/Color/Coarbitrary.hs
@@ -1,18 +0,0 @@-module System.Console.Terminfo.Color.Coarbitrary where--import Test.QuickCheck-import System.Console.Terminfo.Color--color :: Color -> Gen b -> Gen b-color c = case c of-  Black -> var 0-  Red -> var 1-  Green -> var 2-  Yellow -> var 3-  Blue -> var 4-  Magenta -> var 5-  Cyan -> var 6-  White -> var 7-  ColorNumber i -> var 8 . var i-  where-    var = variant
− lib/System/Console/Terminfo/Color/Generators.hs
@@ -1,22 +0,0 @@-module System.Console.Terminfo.Color.Generators where--import Test.QuickCheck-import qualified System.Console.Terminfo.Color as C--basicColors :: [C.Color]-basicColors =-  [ C.Black-  , C.Red-  , C.Green-  , C.Yellow-  , C.Blue-  , C.Magenta-  , C.Cyan-  , C.White-  ]--allColors :: [C.Color]-allColors = basicColors ++ map C.ColorNumber [0..255]--color :: Gen C.Color-color = elements allColors
− lib/System/Console/Terminfo/Color/Shrinkers.hs
@@ -1,11 +0,0 @@-module System.Console.Terminfo.Color.Shrinkers where--import qualified System.Console.Terminfo.Color.Generators as GC-import qualified System.Console.Terminfo.Color as C-import Test.QuickCheck--color :: C.Color -> [C.Color]-color c = case c of-  C.ColorNumber n -> GC.basicColors ++-    map C.ColorNumber (shrinkIntegral n)-  _ -> []
minimum-versions.txt view
@@ -1,7 +1,7 @@ This package was tested to work with these dependency versions and compiler version. These are the minimum versions given in the .cabal file.-Tested as of: 2014-07-13 15:21:37.859452 UTC+Tested as of: 2014-08-12 01:34:46.415423 UTC Path to compiler: ghc-7.4.1 Compiler description: 7.4.1 @@ -33,11 +33,12 @@     time-1.4     unix-2.5.1.0 -/home/massysett/rainbow/tests/sunlight-5537/db:+/home/massysett/rainbow/tests/sunlight-1087/db:     QuickCheck-2.7.5+    barecheck-0.2.0.0     primitive-0.5.3.0-    rainbow-0.14.0.2-    rainbow-tests-0.14.0.2+    rainbow-0.16.0.0+    rainbow-tests-0.16.0.0     random-1.0.1.1     terminfo-0.3.2     text-0.11.2.0
rainbow-tests.cabal view
@@ -3,10 +3,10 @@ -- http://www.github.com/massysett/cartel -- -- Script name used to generate: genCabal.hs--- Generated on: 2014-07-13 11:29:54.334637 EDT+-- Generated on: 2014-08-11 21:29:39.832539 EDT -- Cartel library version: 0.10.0.2 name: rainbow-tests-version: 0.14.0.2+version: 0.16.0.0 cabal-version: >= 1.14 build-type: Simple license: BSD3@@ -37,25 +37,15 @@  Library   exposed-modules:-      Data.Monoid.Coarbitrary-    , Data.Monoid.Generators-    , Data.Monoid.Shrinkers-    , Data.Text.Coarbitrary-    , Data.Text.Generators-    , Data.Text.Shrinkers-    , Rainbow.Tests.Util-    , System.Console.Rainbow.Coarbitrary-    , System.Console.Rainbow.Colors.Coarbitrary-    , System.Console.Rainbow.Colors.Generators-    , System.Console.Rainbow.Colors.Shrinkers-    , System.Console.Rainbow.Generators-    , System.Console.Rainbow.Shrinkers-    , System.Console.Rainbow.Types.Coarbitrary-    , System.Console.Rainbow.Types.Generators-    , System.Console.Rainbow.Types.Shrinkers-    , System.Console.Terminfo.Color.Coarbitrary-    , System.Console.Terminfo.Color.Generators-    , System.Console.Terminfo.Color.Shrinkers+      Rainbow.Coarbitrary+    , Rainbow.Colors.Coarbitrary+    , Rainbow.Colors.Generators+    , Rainbow.Colors.Shrinkers+    , Rainbow.Generators+    , Rainbow.Shrinkers+    , Rainbow.Types.Coarbitrary+    , Rainbow.Types.Generators+    , Rainbow.Types.Shrinkers   default-language: Haskell2010   ghc-options:       -Wall@@ -65,5 +55,6 @@       base ((> 4.5.0.0 || == 4.5.0.0) && < 4.8.0.0)     , terminfo ((> 0.3.2 || == 0.3.2) && < 0.5.0.0)     , text ((> 0.11.2.0 || == 0.11.2.0) && < 1.2.0.0)-    , rainbow == 0.14.0.2+    , rainbow == 0.16.0.0     , QuickCheck ((> 2.7.5 || == 2.7.5) && < 2.8)+    , barecheck ((> 0.2.0.0 || == 0.2.0.0) && < 0.3)
sunlight-test.hs view
@@ -8,7 +8,7 @@   , tiLowest = ("7.4.1", "ghc-7.4.1", "ghc-pkg-7.4.1")   , tiDefault = [ ("7.4.1", "ghc-7.4.1", "ghc-pkg-7.4.1")                 , ("7.6.3", "ghc-7.6.3", "ghc-pkg-7.6.3")-                , ("7.8.2", "ghc-7.8.2", "ghc-pkg-7.8.2") ]+                , ("7.8.3", "ghc-7.8.3", "ghc-pkg-7.8.3") ]   , tiTest = []   }