monoid-subclasses 0.3.1 → 0.3.2
raw patch · 5 files changed
+212/−71 lines, 5 filesdep −utf8-stringdep ~basePVP ok
version bump matches the API change (PVP)
Dependencies removed: utf8-string
Dependency ranges changed: base
API changes (from Hackage documentation)
+ Data.Monoid.Instances.ByteString.UTF8: instance Ord ByteStringUTF8
Files
- Data/Monoid/Instances/ByteString/UTF8.hs +191/−54
- Data/Monoid/Instances/Concat.hs +7/−1
- Data/Monoid/Textual.hs +1/−1
- Test/TestMonoidSubclasses.hs +10/−12
- monoid-subclasses.cabal +3/−3
Data/Monoid/Instances/ByteString/UTF8.hs view
@@ -8,87 +8,224 @@ -- instance. -- -{-# LANGUAGE GeneralizedNewtypeDeriving #-}- module Data.Monoid.Instances.ByteString.UTF8 ( ByteStringUTF8(..) ) where -import Prelude hiding (foldl, foldl1, foldr, foldr1, scanl, scanr, scanl1, scanr1, map, concatMap, break, span)+import Prelude hiding (drop, dropWhile, foldl, foldl1, foldr, foldr1, scanl, scanr, scanl1, scanr1, map, concatMap, break, span) +import Data.Bits ((.&.), (.|.), shiftL, shiftR)+import Data.Char (chr, ord)+import qualified Data.Foldable as Foldable+import qualified Data.List as List+import Data.Maybe (fromMaybe) import Data.String (IsString(fromString))+import Data.Word (Word8) import Data.ByteString (ByteString) import qualified Data.ByteString as ByteString import qualified Data.ByteString.Char8 as ByteString.Char8-import Data.ByteString.Unsafe (unsafeDrop, unsafeIndex)-import qualified Data.ByteString.UTF8 as UTF8+import Data.ByteString.Unsafe (unsafeDrop, unsafeHead, unsafeTail, unsafeIndex) -import Data.Monoid (Monoid)-import Data.Monoid.Cancellative (LeftReductiveMonoid, LeftCancellativeMonoid, LeftGCDMonoid)-import Data.Monoid.Null (MonoidNull, PositiveMonoid)+import Data.Monoid (Monoid(mempty, mappend))+import Data.Monoid.Cancellative (LeftReductiveMonoid(..), LeftCancellativeMonoid, LeftGCDMonoid(..))+import Data.Monoid.Null (MonoidNull(null), PositiveMonoid) import Data.Monoid.Factorial (FactorialMonoid(..)) import Data.Monoid.Textual (TextualMonoid(..)) import qualified Data.Monoid.Factorial as Factorial (FactorialMonoid(..)) import qualified Data.Monoid.Textual as Textual (TextualMonoid(..)) -newtype ByteStringUTF8 = ByteStringUTF8 ByteString deriving (Eq, Monoid, MonoidNull,- LeftReductiveMonoid, LeftCancellativeMonoid, LeftGCDMonoid)+newtype ByteStringUTF8 = ByteStringUTF8 ByteString deriving (Eq, Ord) +instance Monoid ByteStringUTF8 where+ mempty = ByteStringUTF8 ByteString.empty+ ByteStringUTF8 a `mappend` ByteStringUTF8 b = ByteStringUTF8 (a `mappend` b)++instance MonoidNull ByteStringUTF8 where+ null (ByteStringUTF8 b) = ByteString.null b++instance LeftReductiveMonoid ByteStringUTF8 where+ stripPrefix (ByteStringUTF8 a) (ByteStringUTF8 b) = fmap ByteStringUTF8 (stripPrefix a b)+ ByteStringUTF8 a `isPrefixOf` ByteStringUTF8 b = a `isPrefixOf` b++instance LeftCancellativeMonoid ByteStringUTF8++instance LeftGCDMonoid ByteStringUTF8 where+ commonPrefix (ByteStringUTF8 a) (ByteStringUTF8 b) = ByteStringUTF8 (commonPrefix a b)+ stripCommonPrefix (ByteStringUTF8 a) (ByteStringUTF8 b) = wrapTriple (stripCommonPrefix a b)+ instance Show ByteStringUTF8 where- show (ByteStringUTF8 bs) = show (UTF8.toString bs)+ showsPrec _ bs s = '"' : Textual.foldr showsBytes (:) ('"' : s) bs+ where showsBytes (ByteStringUTF8 b) s = '\\' : shows (ByteString.unpack b) s instance IsString ByteStringUTF8 where- fromString = ByteStringUTF8 . UTF8.fromString+ fromString = ByteStringUTF8 . Foldable.foldMap fromChar instance PositiveMonoid ByteStringUTF8 instance FactorialMonoid ByteStringUTF8 where- splitPrimePrefix (ByteStringUTF8 bs) = - do (_, n) <- UTF8.decode bs- let (bytes, rest) = ByteString.splitAt n bs- return (ByteStringUTF8 bytes, ByteStringUTF8 rest)- splitAt n (ByteStringUTF8 bs) = wrapPair (UTF8.splitAt n bs)- take n (ByteStringUTF8 bs) = ByteStringUTF8 (UTF8.take n bs)- drop n (ByteStringUTF8 bs) = ByteStringUTF8 (UTF8.drop n bs)- length (ByteStringUTF8 bs) = UTF8.length bs- span p (ByteStringUTF8 bs) = wrapPair (loop 0)- where limit = ByteString.length bs- loop i = if i < limit- then let w = unsafeIndex bs i- in if w < 0x80- then if p (ByteStringUTF8 $ ByteString.singleton w)- then loop (succ i)- else ByteString.splitAt i bs- else let cs = ByteString.drop i bs- in case UTF8.decode cs- of Just (_,n) | p (ByteStringUTF8 $ ByteString.take n cs)- -> loop (i+n)- _ -> ByteString.splitAt i bs- else (bs, ByteString.empty)+ splitPrimePrefix utf8@(ByteStringUTF8 bs)+ | ByteString.null bs = Nothing+ | unsafeHead bs < 0x80 = Just (wrapPair $ ByteString.splitAt 1 bs)+ | otherwise = case ByteString.findIndex byteStartsCharacter (unsafeTail bs)+ of Just i -> Just (wrapPair $ ByteString.splitAt (succ i) bs)+ Nothing -> Just (utf8, ByteStringUTF8 $ ByteString.empty)+ splitPrimeSuffix utf8@(ByteStringUTF8 bs)+ | ByteString.null bs = Nothing+ | ByteString.null prefix = Just (wrapPair split)+ | not (ByteString.null suffix) && ByteString.last prefix < 0x80 = Just (wrapPair split)+ | otherwise = Just (wrapPair $ ByteString.splitAt (pred $ ByteString.length prefix) bs)+ where split@(prefix, suffix) = ByteString.breakEnd byteStartsCharacter bs+ primePrefix utf8@(ByteStringUTF8 bs)+ | ByteString.null bs = utf8+ | unsafeHead bs < 0x80 = ByteStringUTF8 (ByteString.take 1 bs)+ | otherwise = case ByteString.findIndex byteStartsCharacter (unsafeTail bs)+ of Just i -> ByteStringUTF8 (ByteString.take (succ i) bs)+ Nothing -> utf8+ factors (ByteStringUTF8 bs) = List.map ByteStringUTF8 $ ByteString.groupBy continued bs+ where continued a b = a >= 0x80 && b >= 0x80 && b < 0xC0+ length (ByteStringUTF8 bs) = fst (ByteString.foldl' count (0, False) bs)+ where count (n, high) byte | byte < 0x80 = (succ n, False)+ | byte < 0xC0 = (if high then n else succ n, True)+ | otherwise = (succ n, True)+ foldl f a0 (ByteStringUTF8 bs) = List.foldl f' a0 (groupASCII bs)+ where f' a b | unsafeHead b < 0x80 = ByteString.foldl f'' a b+ | otherwise = f a (ByteStringUTF8 b)+ f'' a w = f a (ByteStringUTF8 $ ByteString.singleton w)+ foldl' f a0 (ByteStringUTF8 bs) = List.foldl' f' a0 (groupASCII bs)+ where f' a b | unsafeHead b < 0x80 = ByteString.foldl' f'' a b+ | otherwise = f a (ByteStringUTF8 b)+ f'' a w = f a (ByteStringUTF8 $ ByteString.singleton w)+ foldr f a0 (ByteStringUTF8 bs) = List.foldr f' a0 (groupASCII bs)+ where f' b a | unsafeHead b < 0x80 = ByteString.foldr f'' a b+ | otherwise = f (ByteStringUTF8 b) a+ f'' w a = f (ByteStringUTF8 $ ByteString.singleton w) a+ splitAt n (ByteStringUTF8 bs) = wrapPair (ByteString.splitAt (charStartIndex n bs) bs)+ take n (ByteStringUTF8 bs) = ByteStringUTF8 (ByteString.take (charStartIndex n bs) bs)+ drop n (ByteStringUTF8 bs) = ByteStringUTF8 (ByteString.drop (charStartIndex n bs) bs)+ dropWhile p (ByteStringUTF8 bs) = dropASCII bs+ where dropASCII bs =+ let suffix = ByteString.dropWhile (\w-> w < 0x80 && p (ByteStringUTF8 $ ByteString.singleton w)) bs+ in if ByteString.null suffix || unsafeHead suffix < 0x80+ then ByteStringUTF8 suffix+ else dropMultiByte suffix+ dropMultiByte bs =+ let utf8 = ByteStringUTF8 bs+ in case ByteString.findIndex byteStartsCharacter (unsafeTail bs)+ of Nothing -> if p utf8 then ByteStringUTF8 ByteString.empty else utf8+ Just i -> let (hd, tl) = ByteString.splitAt (succ i) bs+ in if p (ByteStringUTF8 hd)+ then dropASCII tl+ else utf8+ takeWhile p utf8@(ByteStringUTF8 bs) =+ ByteStringUTF8 $ ByteString.take (ByteString.length bs - ByteString.length s) bs+ where suffix@(ByteStringUTF8 s) = Factorial.dropWhile p utf8+ span p utf8@(ByteStringUTF8 bs) =+ (ByteStringUTF8 $ ByteString.take (ByteString.length bs - ByteString.length s) bs, suffix)+ where suffix@(ByteStringUTF8 s) = Factorial.dropWhile p utf8 break p = Factorial.span (not . p)- takeWhile p = fst . Factorial.span p- dropWhile p = snd . Factorial.span p+ reverse (ByteStringUTF8 bs) =+ ByteStringUTF8 (ByteString.concat $ List.reverse $ List.map reverseASCII $ groupASCII bs)+ where reverseASCII b | unsafeHead b < 0x80 = ByteString.reverse b+ | otherwise = b instance TextualMonoid ByteStringUTF8 where- splitCharacterPrefix (ByteStringUTF8 bs) = do (c, rest) <- UTF8.uncons bs- if c == UTF8.replacement_char- then Nothing- else return (c, ByteStringUTF8 rest)- span pb pc (ByteStringUTF8 bs) = wrapPair (spanASCII 0 bs)- where spanASCII i rest = case ByteString.Char8.findIndex (\c-> c > '\x7f' || not (pc c)) rest- of Nothing -> (bs, ByteString.empty)- Just j -> if unsafeIndex rest j > 0x7f- then spanMultiByte (i + j) (unsafeDrop j rest)- else ByteString.splitAt (i + j) bs- spanMultiByte i rest = case UTF8.decode rest- of Just (c,n) | if c == UTF8.replacement_char- then pb (ByteStringUTF8 $ ByteString.take n rest)- else pc c- -> spanASCII (i+n) (unsafeDrop n rest)- _ -> ByteString.splitAt i bs+ singleton = ByteStringUTF8 . fromChar+ splitCharacterPrefix (ByteStringUTF8 bs) = ByteString.uncons bs >>= uncurry toChar+ foldl ft fc a0 (ByteStringUTF8 bs) = List.foldl f a0 (groupASCII bs)+ where f a b = let hd = unsafeHead b+ in if hd < 0x80+ then ByteString.Char8.foldl fc a b+ else maybe (ft a $ ByteStringUTF8 b) (fc a . fst) (toChar hd $ unsafeTail b)+ foldl' ft fc a0 (ByteStringUTF8 bs) = List.foldl' f a0 (groupASCII bs)+ where f a b = let hd = unsafeHead b+ in if hd < 0x80+ then ByteString.Char8.foldl' fc a b+ else maybe (ft a $ ByteStringUTF8 b) (fc a . fst) (toChar hd $ unsafeTail b)+ foldr ft fc a0 (ByteStringUTF8 bs) = List.foldr f a0 (groupASCII bs)+ where f b a = let hd = unsafeHead b+ in if hd < 0x80+ then ByteString.Char8.foldr fc a b+ else maybe (ft (ByteStringUTF8 b) a) (flip fc a . fst) (toChar hd $ unsafeTail b)+ dropWhile pb pc (ByteStringUTF8 bs) = ByteStringUTF8 $ dropASCII bs+ where dropASCII rest = case ByteString.Char8.findIndex (\c-> c > '\x7f' || not (pc c)) rest+ of Nothing -> ByteString.empty+ Just j -> let rest' = unsafeDrop j rest+ in if unsafeHead rest' > 0x7f+ then dropMultiByte rest'+ else rest'+ dropMultiByte rest = case splitCharacterPrefix (ByteStringUTF8 rest)+ of Just (c, ByteStringUTF8 rest') | pc c -> dropASCII rest'+ Nothing -> let j = succ (headIndex $ drop 1 rest)+ in if pb (ByteStringUTF8 $ ByteString.take j rest)+ then dropASCII (unsafeDrop j rest)+ else rest+ _ -> rest+ takeWhile pb pc utf8@(ByteStringUTF8 bs) =+ ByteStringUTF8 $ ByteString.take (ByteString.length bs - ByteString.length suffix) bs+ where ByteStringUTF8 suffix = Textual.dropWhile pb pc utf8+ span pb pc utf8@(ByteStringUTF8 bs) =+ wrapPair $ ByteString.splitAt (ByteString.length bs - ByteString.length suffix) bs+ where ByteStringUTF8 suffix = Textual.dropWhile pb pc utf8 break pb pc = Textual.span (not . pb) (not . pc)- takeWhile pb pc = fst . Textual.span pb pc- dropWhile pb pc = snd . Textual.span pb pc wrapPair (bs1, bs2) = (ByteStringUTF8 bs1, ByteStringUTF8 bs2)+wrapTriple (bs1, bs2, bs3) = (ByteStringUTF8 bs1, ByteStringUTF8 bs2, ByteStringUTF8 bs3)++fromChar :: Char -> ByteString+fromChar c | c < '\x80' = ByteString.Char8.singleton c+ | c < '\x800' = ByteString.pack [0xC0 + fromIntegral (shiftR n 6),+ 0x80 + fromIntegral (n .&. 0x3F)]+ | c < '\x10000' = ByteString.pack [0xE0 + fromIntegral (shiftR n 12),+ 0x80 + fromIntegral (shiftR n 6 .&. 0x3F),+ 0x80 + fromIntegral (n .&. 0x3F)]+ | n < 0x200000 = ByteString.pack [0xF0 + fromIntegral (shiftR n 18),+ 0x80 + fromIntegral (shiftR n 12 .&. 0x3F),+ 0x80 + fromIntegral (shiftR n 6 .&. 0x3F),+ 0x80 + fromIntegral (n .&. 0x3F)]+ where n = ord c++toChar :: Word8 -> ByteString -> Maybe (Char, ByteStringUTF8)+toChar hd tl | hd < 0x80 = Just (chr $ fromIntegral hd, ByteStringUTF8 tl)+ | hd < 0xC2 = Nothing+ | hd < 0xE0 = do (b0, t0) <- ByteString.uncons tl+ if headIndex tl == 1+ then return (chr (shiftL (fromIntegral hd .&. 0x1F) 6+ .|. fromIntegral b0 .&. 0x3F),+ ByteStringUTF8 t0)+ else Nothing+ | hd < 0xF0 = do (b1, t1) <- ByteString.uncons tl+ (b0, t0) <- ByteString.uncons t1+ if (hd > 0xE0 || b1 >= 0xA0) && headIndex tl == 2+ then return (chr (shiftL (fromIntegral hd .&. 0xF) 12+ .|. shiftL (fromIntegral b1 .&. 0x3F) 6+ .|. fromIntegral b0 .&. 0x3F),+ ByteStringUTF8 t0)+ else Nothing+ | hd < 0xF4 = do (b2, t2) <- ByteString.uncons tl+ (b1, t1) <- ByteString.uncons t2+ (b0, t0) <- ByteString.uncons t1+ if (hd > 0xF0 || b2 >= 0x90) && headIndex tl == 3+ then return (chr (shiftL (fromIntegral hd .&. 0x7) 18+ .|. shiftL (fromIntegral b2 .&. 0x3F) 12+ .|. shiftL (fromIntegral b1 .&. 0x3F) 6+ .|. fromIntegral b0 .&. 0x3F),+ ByteStringUTF8 t0)+ else Nothing+ | otherwise = Nothing++groupASCII :: ByteString -> [ByteString]+groupASCII = ByteString.groupBy continued+ where continued a b = (a < 0x80) == (b < 0x80) && b < 0xC0++headIndex bs = fromMaybe (ByteString.length bs) $ ByteString.findIndex byteStartsCharacter bs++byteStartsCharacter :: Word8 -> Bool+byteStartsCharacter b = b < 0x80 || b >= 0xC0++charStartIndex :: Int -> ByteString -> Int+charStartIndex n _ | n <= 0 = 0+charStartIndex n bs =+ case List.drop (pred n) (ByteString.findIndices byteStartsCharacter $ ByteString.drop 1 bs)+ of [] -> ByteString.length bs+ k:_ -> succ k
Data/Monoid/Instances/Concat.hs view
@@ -23,7 +23,7 @@ import qualified Data.Traversable as Traversable import Data.Maybe (fromMaybe) import Data.String (IsString(..))-import Data.Monoid (Monoid(..), First(..), Sum(..))+import Data.Monoid (Monoid(..), (<>), First(..), Sum(..)) import Data.Monoid.Cancellative (LeftReductiveMonoid(..), RightReductiveMonoid(..), LeftGCDMonoid(..), RightGCDMonoid(..)) import Data.Monoid.Null (MonoidNull(null), PositiveMonoid)@@ -147,6 +147,12 @@ | otherwise -> (Concat $ Seq.singleton xpp, Concat (xps <| xs)) where (xpp, xps) = Factorial.span (p . Concat . Seq.singleton) xp (Concat xsp, xss) = Factorial.span p (Concat xs)+ split p (Concat x) = Foldable.foldr splitNext [mempty] x+ where splitNext a (xp:xs) =+ let as = fmap (Concat . Seq.singleton) (Factorial.split (p . Concat . Seq.singleton) a)+ in if null xp+ then as ++ xs+ else init as ++ (last as <> xp):xs splitAt 0 c = (mempty, c) splitAt n (Concat x) = case Seq.viewl x
Data/Monoid/Textual.hs view
@@ -38,7 +38,7 @@ -- characters. Its methods are generally equivalent to their namesake functions from "Data.List" and "Data.Text", and -- they satisfy the following laws: -- --- > splitCharacterPrefix (singleton c <> t) == Just (c, t)+-- > unfoldr splitCharacterPrefix . fromString == id -- > splitCharacterPrefix . primePrefix == fmap (\(c, t)-> (c, mempty)) . splitCharacterPrefix -- > -- > map f . fromString == fromString . List.map f
Test/TestMonoidSubclasses.hs view
@@ -141,11 +141,10 @@ .&&. checkType (mempty :: Concat ByteString) .&&. checkType (mempty :: Concat Text) .&&. checkType (mempty :: Concat Lazy.Text)- .&&. checkType (mempty :: Concat (Dual String))+ .&&. checkType (mempty :: Concat (Dual ByteString)) .&&. checkType (mempty :: Concat (Maybe String)) .&&. checkType (mempty :: Concat (Text, String))- .&&. checkType (mempty :: Concat (IntMap Int))- .&&. checkType (mempty :: Concat (Map String Int)))+ .&&. checkType (mempty :: Concat (IntMap Int))) checkInstances name (TextualTest checkType) = label name (checkType (mempty :: TestString) .&&. checkType (mempty :: String) .&&. checkType (mempty :: ByteStringUTF8)@@ -311,7 +310,6 @@ ("Textual.scanr1", TextualTest checkTextualScanr1), ("Textual.mapAccumL", TextualTest checkTextualMapAccumL), ("Textual.mapAccumR", TextualTest checkTextualMapAccumR),- ("Textual.mapAccumR", TextualTest checkTextualMapAccumR), ("Textual.takeWhile", TextualTest checkTextualTakeWhile), ("Textual.dropWhile", TextualTest checkTextualDropWhile), ("Textual.span", TextualTest checkTextualSpan),@@ -398,10 +396,10 @@ checkSingleton _ = forAll (arbitrary :: Gen Char) (\c-> Textual.singleton c == (fromString [c] :: a)) checkSplitCharacterPrefix :: forall a. (Arbitrary a, CoArbitrary a, Show a, Eq a, TextualMonoid a) => a -> Property-checkSplitCharacterPrefix _ = forAll (arbitrary :: Gen (Char, a)) check- where check p@(c, t) = Textual.splitCharacterPrefix (Textual.singleton c <> t) == Just p- && Textual.splitCharacterPrefix (primePrefix t)- == fmap (\(c, t)-> (c, mempty)) (Textual.splitCharacterPrefix t)+checkSplitCharacterPrefix _ = forAll (arbitrary :: Gen String) check1 .&&. forAll (arbitrary :: Gen a) check2+ where check1 s = unfoldr Textual.splitCharacterPrefix (fromString s :: a) == s+ check2 t = Textual.splitCharacterPrefix (primePrefix t)+ == fmap (\(c, t)-> (c, mempty)) (Textual.splitCharacterPrefix t) checkCharacterPrefix :: forall a. (Arbitrary a, CoArbitrary a, Show a, Eq a, TextualMonoid a) => a -> Property checkCharacterPrefix _ = forAll (arbitrary :: Gen a) check@@ -465,7 +463,7 @@ && (lefts . textualFactors . Textual.scanl f 'Y') a == (lefts . textualFactors) a && Textual.scanl f 'W' a == Textual.scanl1 f (Textual.singleton 'W' <> a) check2 s = Textual.scanl f 'X' (fromString s :: a) == fromString (List.scanl f 'X' s)- f c1 c2 = succ (max c1 c2)+ f c1 c2 = min c1 c2 checkTextualScanr :: forall a. (Arbitrary a, CoArbitrary a, Show a, Eq a, TextualMonoid a) => a -> Property checkTextualScanr _ = forAll (arbitrary :: Gen a) check1 .&&. forAll (arbitrary :: Gen String) check2@@ -473,19 +471,19 @@ && (lefts . textualFactors . Textual.scanr f 'Y') a == (lefts . textualFactors) a && Textual.scanr f 'W' a == Textual.scanr1 f (a <> Textual.singleton 'W') check2 s = Textual.scanr f 'X' (fromString s :: a) == fromString (List.scanr f 'X' s)- f c1 c2 = succ (max c1 c2)+ f c1 c2 = min c1 c2 checkTextualScanl1 :: forall a. (Arbitrary a, CoArbitrary a, Show a, Eq a, TextualMonoid a) => a -> Property checkTextualScanl1 _ = forAll (arbitrary :: Gen a) check1 .&&. forAll (arbitrary :: Gen String) check2 where check1 a = Textual.scanl1 (const id) a == a check2 s = Textual.scanl1 f (fromString s :: a) == fromString (List.scanl1 f s)- f c1 c2 = succ (max c1 c2)+ f c1 c2 = min c1 c2 checkTextualScanr1 :: forall a. (Arbitrary a, CoArbitrary a, Show a, Eq a, TextualMonoid a) => a -> Property checkTextualScanr1 _ = forAll (arbitrary :: Gen a) check1 .&&. forAll (arbitrary :: Gen String) check2 where check1 a = Textual.scanr1 const a == a check2 s = Textual.scanr1 f (fromString s :: a) == fromString (List.scanr1 f s)- f c1 c2 = succ (max c1 c2)+ f c1 c2 = min c1 c2 checkTextualMapAccumL :: forall a. (Arbitrary a, CoArbitrary a, Show a, Eq a, TextualMonoid a) => a -> Property checkTextualMapAccumL _ = forAll (arbitrary :: Gen a) check1 .&&. forAll (arbitrary :: Gen String) check2
monoid-subclasses.cabal view
@@ -1,5 +1,5 @@ Name: monoid-subclasses-Version: 0.3.1+Version: 0.3.2 Cabal-Version: >= 1.10 Build-Type: Simple Synopsis: Subclasses of Monoid@@ -23,7 +23,7 @@ Exposed-Modules: Data.Monoid.Cancellative, Data.Monoid.Factorial, Data.Monoid.Null, Data.Monoid.Textual, Data.Monoid.Instances.ByteString.UTF8, Data.Monoid.Instances.Concat Build-Depends: base < 5, bytestring >= 0.9 && < 1.0, containers == 0.5.*, text == 0.11.*, primes == 0.2.*,- utf8-string == 0.3.*, vector >= 0.9 && < 0.11+ vector >= 0.9 && < 0.11 GHC-prof-options: -auto-all if impl(ghc >= 7.0.0) default-language: Haskell2010@@ -32,7 +32,7 @@ Type: exitcode-stdio-1.0 x-uses-tf: true Build-Depends: base < 5, bytestring >= 0.9 && < 1.0, containers == 0.5.*, text == 0.11.*, primes == 0.2.*,- utf8-string == 0.3.*, vector >= 0.9 && < 0.11, QuickCheck == 2.*, quickcheck-instances == 0.3.*,+ vector >= 0.9 && < 0.11, QuickCheck == 2.*, quickcheck-instances == 0.3.*, test-framework >= 0.4.1, test-framework-quickcheck2 Main-is: Test/TestMonoidSubclasses.hs Other-Modules: Data.Monoid.Cancellative, Data.Monoid.Factorial, Data.Monoid.Null, Data.Monoid.Textual,