Hello community, here is the log from the commit of package ghc-ListLike for openSUSE:Factory checked in at 2016-11-24 21:23:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-ListLike (Old) and /work/SRC/openSUSE:Factory/.ghc-ListLike.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-ListLike" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-ListLike/ghc-ListLike.changes 2016-11-14 20:11:11.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-ListLike.new/ghc-ListLike.changes 2016-11-24 21:23:19.000000000 +0100 @@ -1,0 +2,5 @@ +Thu Sep 15 06:55:03 UTC 2016 - psim...@suse.com + +- Update to version 4.5 revision 0 with cabal2obs. + +------------------------------------------------------------------- Old: ---- ListLike-4.2.1.tar.gz New: ---- ListLike-4.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-ListLike.spec ++++++ --- /var/tmp/diff_new_pack.6oW20Y/_old 2016-11-24 21:23:20.000000000 +0100 +++ /var/tmp/diff_new_pack.6oW20Y/_new 2016-11-24 21:23:20.000000000 +0100 @@ -19,22 +19,23 @@ %global pkg_name ListLike %bcond_with tests Name: ghc-%{pkg_name} -Version: 4.2.1 +Version: 4.5 Release: 0 Summary: Generic support for list-like structures License: BSD-3-Clause -Group: System/Libraries +Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel -# Begin cabal-rpm deps: BuildRequires: ghc-array-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-containers-devel +BuildRequires: ghc-deepseq-devel BuildRequires: ghc-dlist-devel BuildRequires: ghc-fmlist-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-text-devel +BuildRequires: ghc-utf8-string-devel BuildRequires: ghc-vector-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build %if %{with tests} @@ -42,7 +43,6 @@ BuildRequires: ghc-QuickCheck-devel BuildRequires: ghc-random-devel %endif -# End cabal-rpm deps %description Generic support for list-like structures in Haskell. @@ -70,20 +70,14 @@ %prep %setup -q -n %{pkg_name}-%{version} - %build %ghc_lib_build - %install %ghc_lib_install - %check -%if %{with tests} -%{cabal} test -%endif - +%cabal_test %post devel %ghc_pkg_recache ++++++ ListLike-4.2.1.tar.gz -> ListLike-4.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/ListLike.cabal new/ListLike-4.5/ListLike.cabal --- old/ListLike-4.2.1/ListLike.cabal 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/ListLike.cabal 2016-07-23 19:19:23.000000000 +0200 @@ -1,5 +1,5 @@ Name: ListLike -Version: 4.2.1 +Version: 4.5 License: BSD3 Maintainer: John Lato <jwl...@gmail.com> Author: John Goerzen @@ -9,7 +9,7 @@ Category: Generics Cabal-Version: >= 1.8 Build-Type: Simple -homepage: http://software.complete.org/listlike +homepage: http://github.com/JohnLato/listlike synopsis: Generic support for list-like structures Description: Generic support for list-like structures in Haskell. . @@ -22,19 +22,24 @@ ByteString, for types that support input and output, and for types that can handle infinite lists. Stability: Stable +Tested-With: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1 Library + GHC-Options: -O2 Hs-Source-Dirs: src Exposed-Modules: Data.ListLike Data.ListLike.Base + Data.ListLike.Chars Data.ListLike.CharString Data.ListLike.FoldableLL Data.ListLike.IO Data.ListLike.Instances Data.ListLike.String Data.ListLike.Text + Data.ListLike.Text.Builder Data.ListLike.Text.Text Data.ListLike.Text.TextLazy + Data.ListLike.UTF8 Data.ListLike.Utils Data.ListLike.Vector Data.ListLike.Vector.Generic @@ -52,9 +57,12 @@ ,vector >= 0.5 && < 0.12 ,dlist >= 0.7 && < 0.9 ,fmlist >= 0.8 && < 0.10 - + ,utf8-string + ,deepseq + Test-suite listlike-tests - Hs-source-dirs: src testsrc + GHC-Options: -O2 + Hs-source-dirs: testsrc Main-is: runtests.hs Type: exitcode-stdio-1.0 @@ -71,6 +79,7 @@ ,fmlist ,text ,vector + ,utf8-string source-repository head type: git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/Base.hs new/ListLike-4.5/src/Data/ListLike/Base.hs --- old/ListLike-4.2.1/src/Data/ListLike/Base.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike/Base.hs 2016-07-23 19:19:23.000000000 +0200 @@ -3,7 +3,8 @@ ,FunctionalDependencies ,FlexibleInstances ,BangPatterns - ,FlexibleContexts #-} + ,FlexibleContexts + ,CPP #-} {- Copyright (C) 2007 John Goerzen <jgoer...@complete.org> @@ -34,7 +35,7 @@ InfiniteListLike(..), zip, zipWith, sequence_ ) where -import Prelude hiding (length, head, last, null, tail, map, filter, concat, +import Prelude hiding (length, uncons, head, last, null, tail, map, filter, concat, any, lookup, init, all, foldl, foldr, foldl1, foldr1, maximum, minimum, iterate, span, break, takeWhile, dropWhile, dropWhileEnd, reverse, zip, zipWith, sequence, @@ -93,6 +94,11 @@ {- | Extracts the first element of a 'ListLike'. -} head :: full -> item + head = maybe (error "head") fst . uncons + + {- | Extract head and tail, return Nothing if empty -} + uncons :: full -> Maybe (item, full) + uncons x = if null x then Nothing else Just (head x, tail x) -- please don't {- | Extracts the last element of a 'ListLike'. -} last :: full -> item @@ -102,7 +108,8 @@ _ -> last (tail l) {- | Gives all elements after the head. -} - tail :: full -> full + tail :: full -> full + tail = maybe (error "tail") snd . uncons {- | All elements of the list except the last one. See also 'inits'. -} init :: full -> full @@ -281,6 +288,19 @@ any (isPrefixOf needle) thetails where thetails = asTypeOf (tails haystack) [haystack] + ------------------------------ Conditionally modify based on predicates + {- | Remove a prefix from a listlike if possible -} + stripPrefix :: Eq item => full -> full -> Maybe full + stripPrefix xs ys = if xs `isPrefixOf` ys + then Just $ drop (length xs) ys + else Nothing + + {- | Remove a suffix from a listlike if possible -} + stripSuffix :: Eq item => full -> full -> Maybe full + stripSuffix xs ys = if xs `isSuffixOf` ys + then Just $ take (length ys - length xs) ys + else Nothing + ------------------------------ Searching {- | True if the item occurs in the list -} elem :: Eq item => item -> full -> Bool @@ -419,6 +439,7 @@ Default implementation is @fromListLike = map id@ -} fromListLike :: ListLike full' item => full -> full' fromListLike = map id + {-# INLINE fromListLike #-} ------------------------------ Generalized functions {- | Generic version of 'nub' -} @@ -515,6 +536,13 @@ | count <= 0 = empty | otherwise = map (\_ -> x) [1..count] +#if __GLASGOW_HASKELL__ >= 708 + {-# MINIMAL (singleton, uncons, null) | + (singleton, uncons, genericLength) | + (singleton, head, tail, null) | + (singleton, head, tail, genericLength) #-} +#endif + {- instance (ListLike full item) => Monad full where m >>= k = foldr (append . k) empty m @@ -592,6 +620,7 @@ isPrefixOf = L.isPrefixOf isSuffixOf = L.isSuffixOf isInfixOf = L.isInfixOf + stripPrefix = L.stripPrefix elem = L.elem notElem = L.notElem find = L.find diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/CharString.hs new/ListLike-4.5/src/Data/ListLike/CharString.hs --- old/ListLike-4.2.1/src/Data/ListLike/CharString.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike/CharString.hs 2016-07-23 19:19:23.000000000 +0200 @@ -1,4 +1,4 @@ -{-# LANGUAGE MultiParamTypeClasses +{-# LANGUAGE MultiParamTypeClasses ,FlexibleInstances ,TypeSynonymInstances #-} @@ -133,7 +133,7 @@ --insert = BS.insert toList = BS.unpack . unCS fromList = CS . BS.pack - fromListLike = fromList . toList + --fromListLike = fromList . toList --nubBy = BS.nubBy --deleteBy = BS.deleteBy --deleteFirstsBy = BS.deleteFirstsBy @@ -252,7 +252,7 @@ --insert = BSL.insert toList = BSL.unpack . unCSL fromList = CSL . BSL.pack - fromListLike = fromList . toList + --fromListLike = fromList . toList --nubBy = BSL.nubBy --deleteBy = BSL.deleteBy --deleteFirstsBy = BSL.deleteFirstsBy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/Chars.hs new/ListLike-4.5/src/Data/ListLike/Chars.hs --- old/ListLike-4.2.1/src/Data/ListLike/Chars.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/ListLike-4.5/src/Data/ListLike/Chars.hs 2016-07-23 19:19:23.000000000 +0200 @@ -0,0 +1,87 @@ +-- | Work in progress. +{-# LANGUAGE CPP + ,MultiParamTypeClasses + ,FlexibleInstances #-} + +module Data.ListLike.Chars + +where + +#if !MIN_VERSION_base(4,8,0) +import Control.Applicative +import Data.Monoid +#endif +import Control.DeepSeq +import Control.Monad +import Data.String as String (IsString(fromString)) +import qualified Data.Text.Lazy as T +import qualified Data.Text.Lazy.IO as TI +import qualified Data.Text.Lazy.Builder as Builder +import Data.Text.Encoding (decodeUtf8) +import Data.ListLike.Base as LL +import Data.ListLike.FoldableLL as LL +import Data.ListLike.IO +import Data.ListLike.String as LL +import Data.ListLike.Text + +data Chars + = B Builder.Builder + | T T.Text + deriving (Show, Eq, Ord) + +builder :: Chars -> Builder.Builder +builder (B x) = x +builder (T s) = Builder.fromLazyText s +{-# INLINE builder #-} + +instance Monoid Chars where + mempty = B mempty + mappend a b = B $ mappend (builder a) (builder b) + +instance String.IsString Chars where + fromString = B . String.fromString + +instance FoldableLL Chars Char where + foldl f r0 (B b) = LL.foldl f r0 . Builder.toLazyText $ b + foldl f r0 (T s) = LL.foldl f r0 $ s + foldr f r0 (B b) = LL.foldr f r0 . Builder.toLazyText $ b + foldr f r0 (T s) = LL.foldr f r0 $ s + -- + foldl' f r0 (B b) = LL.foldl' f r0 . Builder.toLazyText $ b + foldl' f r0 (T s) = LL.foldl' f r0 $ s + foldl1 f (B b) = LL.foldl1 f . Builder.toLazyText $ b + foldl1 f (T s) = LL.foldl1 f $ s + foldr' f r0 (B b) = LL.foldr' f r0 . Builder.toLazyText $ b + foldr' f r0 (T s) = LL.foldr' f r0 $ s + foldr1 f (B b) = LL.foldr1 f . Builder.toLazyText $ b + foldr1 f (T s) = LL.foldr1 f $ s + +instance ListLike Chars Char where + singleton = B . Builder.singleton + uncons (B b) = + case LL.uncons (Builder.toLazyText b) of + Nothing -> Nothing + Just (c, s) -> Just (c, T s) + uncons (T s) = + case LL.uncons s of + Nothing -> Nothing + Just (c, s') -> Just (c, T s') + null (B b) = LL.null . Builder.toLazyText $ b + null (T t) = LL.null t + +instance ListLikeIO Chars Char where + hGetLine h = T <$> hGetLine h + hGetContents h = T <$> hGetContents h + hGet h n = T <$> hGet h n + hGetNonBlocking h n = T <$> hGetNonBlocking h n + hPutStr h (B b) = hPutStr h . Builder.toLazyText $ b + hPutStr h (T s) = hPutStr h $ s + +instance StringLike Chars where + toString (B b) = toString . Builder.toLazyText $ b + toString (T s) = toString $ s + fromString = B . Builder.fromLazyText . LL.fromString + +instance NFData Chars where + rnf (B b) = rnf . Builder.toLazyText $ b + rnf (T s) = rnf s diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/IO.hs new/ListLike-4.5/src/Data/ListLike/IO.hs --- old/ListLike-4.2.1/src/Data/ListLike/IO.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike/IO.hs 2016-07-23 19:19:23.000000000 +0200 @@ -1,4 +1,4 @@ -{-# LANGUAGE MultiParamTypeClasses +{-# LANGUAGE MultiParamTypeClasses ,FunctionalDependencies #-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/Instances.hs new/ListLike-4.5/src/Data/ListLike/Instances.hs --- old/ListLike-4.2.1/src/Data/ListLike/Instances.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike/Instances.hs 2016-07-23 19:19:23.000000000 +0200 @@ -47,8 +47,10 @@ import Data.ListLike.IO import Data.ListLike.FoldableLL import Data.ListLike.Text () +import Data.ListLike.UTF8 import Data.ListLike.Vector () import Data.Int +import Data.Maybe (fromMaybe) import Data.Monoid import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BSC @@ -58,6 +60,8 @@ import Data.Array.IArray((!), (//), Ix(..)) import qualified Data.ByteString.Lazy as BSL import qualified Data.ByteString.Lazy.Char8 as BSLC +import Data.String.UTF8 (UTF8) +import qualified Data.String.UTF8 as UTF8 import qualified System.IO as IO import Data.Word @@ -108,6 +112,7 @@ cons = BS.cons snoc = BS.snoc append = BS.append + uncons = BS.uncons head = BS.head last = BS.last tail = BS.tail @@ -162,7 +167,7 @@ --insert = BS.insert toList = BS.unpack fromList = BS.pack - fromListLike = fromList . toList + --fromListLike = fromList . toList --nubBy = BS.nubBy --deleteBy = BS.deleteBy --deleteFirstsBy = BS.deleteFirstsBy @@ -218,6 +223,7 @@ cons = BSL.cons snoc = BSL.snoc append = BSL.append + uncons = BSL.uncons head = BSL.head last = BSL.last tail = BSL.tail @@ -273,7 +279,7 @@ --insert = BSL.insert toList = BSL.unpack fromList = BSL.pack - fromListLike = fromList . toList + --fromListLike = fromList . toList --nubBy = BSL.nubBy --deleteBy = BSL.deleteBy --deleteFirstsBy = BSL.deleteFirstsBy @@ -547,7 +553,7 @@ --insert = S.insert toList = F.toList fromList = S.fromList - fromListLike = fromList . toList + --fromListLike = fromList . toList --nubBy = --deleteBy = --deleteFirstsBy = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/Text/Builder.hs new/ListLike-4.5/src/Data/ListLike/Text/Builder.hs --- old/ListLike-4.2.1/src/Data/ListLike/Text/Builder.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/ListLike-4.5/src/Data/ListLike/Text/Builder.hs 2016-07-23 19:19:23.000000000 +0200 @@ -0,0 +1,44 @@ +{-# LANGUAGE CPP + ,MultiParamTypeClasses + ,FlexibleInstances #-} + +module Data.ListLike.Text.Builder + +where + +#if !MIN_VERSION_base(4,8,0) +import Control.Applicative +#endif +import Control.DeepSeq (NFData(rnf)) +import qualified Data.Text.Lazy.Builder as Builder +import Data.ListLike.Base as LL +import Data.ListLike.FoldableLL as LL +import Data.ListLike.IO +import Data.ListLike.String as LL +import Data.ListLike.Text.TextLazy () +import Data.String (IsString(fromString)) + +instance FoldableLL Builder.Builder Char where + foldl f r0 = LL.foldl f r0 . Builder.toLazyText + foldr f r0 = LL.foldr f r0 . Builder.toLazyText + +instance ListLike Builder.Builder Char where + singleton = Builder.singleton + uncons b = case LL.uncons (Builder.toLazyText b) of + Nothing -> Nothing + Just (c, s) -> Just (c, Builder.fromLazyText s) + null = LL.null . Builder.toLazyText + +instance ListLikeIO Builder.Builder Char where + hGetLine h = Builder.fromLazyText <$> hGetLine h + hGetContents h = Builder.fromLazyText <$> hGetContents h + hGet h n = Builder.fromLazyText <$> hGet h n + hGetNonBlocking h n = Builder.fromLazyText <$> hGetNonBlocking h n + hPutStr h = hPutStr h . Builder.toLazyText + +instance StringLike Builder.Builder where + toString = toString . Builder.toLazyText + fromString = Builder.fromLazyText . LL.fromString + +instance NFData Builder.Builder where + rnf = rnf . Builder.toLazyText diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/Text/Text.hs new/ListLike-4.5/src/Data/ListLike/Text/Text.hs --- old/ListLike-4.2.1/src/Data/ListLike/Text/Text.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike/Text/Text.hs 2016-07-23 19:19:23.000000000 +0200 @@ -59,6 +59,8 @@ tails = fromList . T.tails isPrefixOf = T.isPrefixOf isSuffixOf = T.isSuffixOf + stripPrefix = T.stripPrefix + stripSuffix = T.stripSuffix elem = T.isInfixOf . T.singleton find = T.find filter = T.filter @@ -66,7 +68,7 @@ findIndex = T.findIndex toList = T.unpack fromList = T.pack - fromListLike = fromList . toList + --fromListLike = fromList . toList groupBy f = fromList . T.groupBy f genericLength = fromInteger . fromIntegral . T.length genericTake i = T.take (fromIntegral i) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/Text/TextLazy.hs new/ListLike-4.5/src/Data/ListLike/Text/TextLazy.hs --- old/ListLike-4.2.1/src/Data/ListLike/Text/TextLazy.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike/Text/TextLazy.hs 2016-07-23 19:19:23.000000000 +0200 @@ -58,13 +58,15 @@ tails = fromList . T.tails isPrefixOf = T.isPrefixOf isSuffixOf = T.isSuffixOf + stripPrefix = T.stripPrefix + stripSuffix = T.stripSuffix elem = T.isInfixOf . T.singleton find = T.find filter = T.filter index t = T.index t . fromIntegral toList = T.unpack fromList = T.pack - fromListLike = fromList . toList + --fromListLike = fromList . toList groupBy f = fromList . T.groupBy f genericLength = fromInteger . fromIntegral . T.length genericTake i = T.take (fromIntegral i) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/Text.hs new/ListLike-4.5/src/Data/ListLike/Text.hs --- old/ListLike-4.2.1/src/Data/ListLike/Text.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike/Text.hs 2016-07-23 19:19:23.000000000 +0200 @@ -5,5 +5,6 @@ where +import Data.ListLike.Text.Builder import Data.ListLike.Text.Text import Data.ListLike.Text.TextLazy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/UTF8.hs new/ListLike-4.5/src/Data/ListLike/UTF8.hs --- old/ListLike-4.2.1/src/Data/ListLike/UTF8.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/ListLike-4.5/src/Data/ListLike/UTF8.hs 2016-07-23 19:19:23.000000000 +0200 @@ -0,0 +1,262 @@ +{-# LANGUAGE CPP + ,MultiParamTypeClasses + ,FlexibleInstances + ,TypeFamilies + ,TypeSynonymInstances + ,UndecidableInstances #-} + +{- | +Instances of 'Data.ListLike.ListLike' and related classes. +Re-exported by "Data.ListLike". +-} + +-------------------------------------------------- +-- UTF8 ByteString + +module Data.ListLike.UTF8 () where + +#if !MIN_VERSION_base(4,8,0) +import Control.Applicative +#endif +import qualified Data.ByteString as BS +import qualified Data.ByteString.Char8 as BSC +import qualified Data.ByteString.Lazy as BSL +import qualified Data.ByteString.Lazy.Char8 as BSLC +import Control.DeepSeq (NFData(rnf)) +import Data.ListLike.Base +import Data.ListLike.FoldableLL +import Data.ListLike.IO +import Data.ListLike.String (StringLike(..)) +import Data.Maybe (fromMaybe) +import Data.Monoid (Monoid(..)) +import Data.String (IsString(fromString)) +import Data.String.UTF8 (UTF8, UTF8Bytes) +import qualified Data.String.UTF8 as UTF8 +import GHC.Generics + +utf8rnf :: NFData a => UTF8 a -> () +utf8rnf = rnf . UTF8.toRep + +instance UTF8Bytes string index => IsString (UTF8 string) where + fromString = UTF8.fromString + +instance FoldableLL (UTF8 BS.ByteString) Char where + foldl = UTF8.foldl + -- foldl' = UTF8.foldl' + -- foldl1 = UTF8.foldl1 + foldr = UTF8.foldr + -- foldr' = UTF8.foldr' + -- foldr1 = UTF8.foldr1 + +instance ListLike (UTF8 BS.ByteString) Char where + empty = mempty + singleton c = UTF8.fromString [c] + -- cons = UTF8.cons + -- snoc = UTF8.snoc + -- append = UTF8.append + uncons = UTF8.uncons + head = fst . fromMaybe (error "head") . uncons + -- last = UTF8.last + tail = snd . fromMaybe (error "tail") . uncons + -- init = UTF8.init + null s = UTF8.length s == 0 + length = UTF8.length + -- -- map = + -- rigidMap = UTF8.map + -- reverse = UTF8.reverse + -- intersperse = UTF8.intersperse + -- concat = UTF8.concat . toList + -- --concatMap = + -- rigidConcatMap = UTF8.concatMap + -- any = UTF8.any + -- all = UTF8.all + -- maximum = UTF8.maximum + -- minimum = UTF8.minimum + -- replicate = UTF8.replicate + take = UTF8.take + drop = UTF8.drop + splitAt = UTF8.splitAt + -- takeWhile = UTF8.takeWhile + -- dropWhile = UTF8.dropWhile + span = UTF8.span + break = UTF8.break + -- group = fromList . UTF8.group + -- inits = fromList . UTF8.inits + -- tails = fromList . UTF8.tails + -- isPrefixOf = UTF8.isPrefixOf + -- isSuffixOf = UTF8.isSuffixOf + -- --isInfixOf = UTF8.isInfixOf + -- elem = UTF8.elem + -- notElem = UTF8.notElem + -- find = UTF8.find + -- filter = UTF8.filter + -- --partition = UTF8.partition + -- index = UTF8.index + -- elemIndex = UTF8.elemIndex + -- elemIndices x = fromList . UTF8.elemIndices x + -- findIndex = UTF8.findIndex + -- findIndices x = fromList . UTF8.findIndices x + -- -- the default definitions don't work well for array-like things, so + -- -- do monadic stuff via a list instead + -- sequence = liftM fromList . P.sequence . toList + -- mapM func = liftM fromList . P.mapM func . toList + -- --nub = UTF8.nub + -- --delete = UTF8.delete + -- --deleteFirsts = UTF8.deleteFirsts + -- --union = UTF8.union + -- --intersect = UTF8.intersect + -- sort = UTF8.sort + -- --insert = UTF8.insert + toList = UTF8.toString + -- fromList = UTF8.pack + -- fromListLike = fromList . toList + -- --nubBy = UTF8.nubBy + -- --deleteBy = UTF8.deleteBy + -- --deleteFirstsBy = UTF8.deleteFirstsBy + -- --unionBy = UTF8.unionBy + -- --intersectBy = UTF8.intersectBy + -- groupBy f = fromList . UTF8.groupBy f + -- --sortBy = UTF8.sortBy + -- --insertBy = UTF8.insertBy + -- genericLength = fromInteger . fromIntegral . UTF8.length + -- genericTake i = UTF8.take (fromIntegral i) + -- genericDrop i = UTF8.drop (fromIntegral i) + -- genericSplitAt i = UTF8.splitAt (fromIntegral i) + -- genericReplicate i = UTF8.replicate (fromIntegral i) + +instance ListLikeIO (UTF8 BS.ByteString) Char where + hGetLine h = UTF8.fromRep <$> BS.hGetLine h + hGetContents h = UTF8.fromRep <$> BS.hGetContents h + hGet h n = UTF8.fromRep <$> BS.hGet h n + hGetNonBlocking h n = UTF8.fromRep <$> BS.hGetNonBlocking h n + hPutStr h s = BS.hPutStr h (UTF8.toRep s) + hPutStrLn h s = BSC.hPutStrLn h (UTF8.toRep s) + -- getLine = BS.getLine + -- getContents = BS.getContents + -- putStr = BS.putStr + -- putStrLn = BSC.putStrLn + -- interact = BS.interact + -- readFile = BS.readFile + -- writeFile = BS.writeFile + -- appendFile = BS.appendFile + +instance StringLike (UTF8 BS.ByteString) where + toString = UTF8.toString + fromString = UTF8.fromString + +instance Monoid (UTF8 BS.ByteString) where + mempty = UTF8.fromString [] + mappend a b = UTF8.fromRep (mappend (UTF8.toRep a) (UTF8.toRep b)) + +-------------------------------------------------- +-- UTF8 Lazy.ByteString + +instance FoldableLL (UTF8 BSL.ByteString) Char where + foldl = UTF8.foldl + -- foldl' = UTF8.foldl' + -- foldl1 = UTF8.foldl1 + foldr = UTF8.foldr + -- foldr' = UTF8.foldr' + -- foldr1 = UTF8.foldr1 + +instance ListLike (UTF8 BSL.ByteString) Char where + empty = mempty + singleton c = UTF8.fromString [c] + -- cons = UTF8.cons + -- snoc = UTF8.snoc + -- append = UTF8.append + uncons = UTF8.uncons + head = fst . fromMaybe (error "head") . uncons + -- last = UTF8.last + tail = snd . fromMaybe (error "tail") . uncons + -- init = UTF8.init + null s = UTF8.length s == 0 + length = fromInteger . toInteger . UTF8.length + -- -- map = + -- rigidMap = UTF8.map + -- reverse = UTF8.reverse + -- intersperse = UTF8.intersperse + -- concat = UTF8.concat . toList + -- --concatMap = + -- rigidConcatMap = UTF8.concatMap + -- any = UTF8.any + -- all = UTF8.all + -- maximum = UTF8.maximum + -- minimum = UTF8.minimum + -- replicate = UTF8.replicate + take = UTF8.take . fromInteger . toInteger + drop = UTF8.drop . fromInteger . toInteger + splitAt = UTF8.splitAt . fromInteger . toInteger + -- takeWhile = UTF8.takeWhile + -- dropWhile = UTF8.dropWhile + span = UTF8.span + break = UTF8.break + -- group = fromList . UTF8.group + -- inits = fromList . UTF8.inits + -- tails = fromList . UTF8.tails + -- isPrefixOf = UTF8.isPrefixOf + -- isSuffixOf = UTF8.isSuffixOf + -- --isInfixOf = UTF8.isInfixOf + -- elem = UTF8.elem + -- notElem = UTF8.notElem + -- find = UTF8.find + -- filter = UTF8.filter + -- --partition = UTF8.partition + -- index = UTF8.index + -- elemIndex = UTF8.elemIndex + -- elemIndices x = fromList . UTF8.elemIndices x + -- findIndex = UTF8.findIndex + -- findIndices x = fromList . UTF8.findIndices x + -- -- the default definitions don't work well for array-like things, so + -- -- do monadic stuff via a list instead + -- sequence = liftM fromList . P.sequence . toList + -- mapM func = liftM fromList . P.mapM func . toList + -- --nub = UTF8.nub + -- --delete = UTF8.delete + -- --deleteFirsts = UTF8.deleteFirsts + -- --union = UTF8.union + -- --intersect = UTF8.intersect + -- sort = UTF8.sort + -- --insert = UTF8.insert + toList = UTF8.toString + -- fromList = UTF8.pack + -- fromListLike = fromList . toList + -- --nubBy = UTF8.nubBy + -- --deleteBy = UTF8.deleteBy + -- --deleteFirstsBy = UTF8.deleteFirstsBy + -- --unionBy = UTF8.unionBy + -- --intersectBy = UTF8.intersectBy + -- groupBy f = fromList . UTF8.groupBy f + -- --sortBy = UTF8.sortBy + -- --insertBy = UTF8.insertBy + -- genericLength = fromInteger . fromIntegral . UTF8.length + -- genericTake i = UTF8.take (fromIntegral i) + -- genericDrop i = UTF8.drop (fromIntegral i) + -- genericSplitAt i = UTF8.splitAt (fromIntegral i) + -- genericReplicate i = UTF8.replicate (fromIntegral i) + +instance ListLikeIO (UTF8 BSL.ByteString) Char where + hGetLine h = (UTF8.fromRep . BSL.fromStrict) <$> BS.hGetLine h + hGetContents h = (UTF8.fromRep) <$> BSL.hGetContents h + hGet h n = UTF8.fromRep <$> BSL.hGet h n + hGetNonBlocking h n = UTF8.fromRep <$> BSL.hGetNonBlocking h n + hPutStr h s = BSL.hPutStr h (UTF8.toRep s) + hPutStrLn h s = BSLC.hPutStrLn h (UTF8.toRep s) + -- getLine = BSL.getLine + -- getContents = BSL.getContents + -- putStr = BSL.putStr + -- putStrLn = BSLC.putStrLn + -- interact = BSL.interact + -- readFile = BSL.readFile + -- writeFile = BSL.writeFile + -- appendFile = BSL.appendFile + +instance StringLike (UTF8 BSL.ByteString) where + toString = UTF8.toString + fromString = UTF8.fromString + +instance Monoid (UTF8 BSL.ByteString) where + mempty = UTF8.fromString [] + mappend a b = UTF8.fromRep (mappend (UTF8.toRep a) (UTF8.toRep b)) + +{-# RULES "fromListLike/a" fromListLike = id :: a -> a #-} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/Utils.hs new/ListLike-4.5/src/Data/ListLike/Utils.hs --- old/ListLike-4.2.1/src/Data/ListLike/Utils.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike/Utils.hs 2016-07-23 19:19:23.000000000 +0200 @@ -69,9 +69,7 @@ -- | Converts to a MonadPlus instance toMonadPlus :: (MonadPlus m, ListLike full a) => full -> m (a, full) -toMonadPlus c - | null c = mzero - | otherwise = return (head c, tail c) +toMonadPlus = maybe mzero return . uncons -- | List-like destructor (like Data.Maybe.maybe) list :: ListLike full a => b -> (a -> full -> b) -> full -> b diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/Vector/Generic.hs new/ListLike-4.5/src/Data/ListLike/Vector/Generic.hs --- old/ListLike-4.2.1/src/Data/ListLike/Vector/Generic.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike/Vector/Generic.hs 2016-07-23 19:19:23.000000000 +0200 @@ -1,8 +1,11 @@ -{-# LANGUAGE MultiParamTypeClasses +{-# LANGUAGE CPP + ,MultiParamTypeClasses ,FlexibleContexts ,FlexibleInstances - ,OverlappingInstances ,UndecidableInstances #-} +#if __GLASGOW_HASKELL__ < 710 +{-# LANGUAGE OverlappingInstances #-} +#endif -- | ListLike instance for any type supporting the @Data.Vector.Generic@ -- interface. To avoid collisions with other Vector instances, this module @@ -21,7 +24,7 @@ import Data.Monoid -instance V.Vector v a => FoldableLL (v a) a where +instance {-# OVERLAPPABLE #-} V.Vector v a => FoldableLL (v a) a where foldl = V.foldl foldl' = V.foldl' foldl1 = V.foldl1 @@ -29,7 +32,7 @@ foldr' = V.foldr' foldr1 = V.foldr1 -instance (Monoid (v a), Eq (v a), V.Vector v a) => ListLike (v a) a where +instance {-# OVERLAPPABLE #-} (Monoid (v a), Eq (v a), V.Vector v a) => ListLike (v a) a where empty = V.empty singleton = V.singleton cons = V.cons @@ -70,7 +73,7 @@ findIndex = V.findIndex toList = V.toList fromList = V.fromList - fromListLike = fromList . toList + --fromListLike = fromList . toList --groupBy f = genericLength = fromInteger . fromIntegral . V.length genericTake i = V.take (fromIntegral i) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/Vector/Storable.hs new/ListLike-4.5/src/Data/ListLike/Vector/Storable.hs --- old/ListLike-4.2.1/src/Data/ListLike/Vector/Storable.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike/Vector/Storable.hs 2016-07-23 19:19:23.000000000 +0200 @@ -66,7 +66,7 @@ findIndex = V.findIndex toList = V.toList fromList = V.fromList - fromListLike = fromList . toList + --fromListLike = fromList . toList --groupBy f = genericLength = fromInteger . fromIntegral . V.length genericTake i = V.take (fromIntegral i) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/Vector/Unboxed.hs new/ListLike-4.5/src/Data/ListLike/Vector/Unboxed.hs --- old/ListLike-4.2.1/src/Data/ListLike/Vector/Unboxed.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike/Vector/Unboxed.hs 2016-07-23 19:19:23.000000000 +0200 @@ -65,7 +65,7 @@ findIndex = V.findIndex toList = V.toList fromList = V.fromList - fromListLike = fromList . toList + --fromListLike = fromList . toList --groupBy f = genericLength = fromInteger . fromIntegral . V.length genericTake i = V.take (fromIntegral i) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike/Vector/Vector.hs new/ListLike-4.5/src/Data/ListLike/Vector/Vector.hs --- old/ListLike-4.2.1/src/Data/ListLike/Vector/Vector.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike/Vector/Vector.hs 2016-07-23 19:19:23.000000000 +0200 @@ -64,7 +64,7 @@ findIndex = V.findIndex toList = V.toList fromList = V.fromList - fromListLike = fromList . toList + --fromListLike = fromList . toList --groupBy f = genericLength = fromInteger . fromIntegral . V.length genericTake i = V.take (fromIntegral i) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/src/Data/ListLike.hs new/ListLike-4.5/src/Data/ListLike.hs --- old/ListLike-4.2.1/src/Data/ListLike.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/src/Data/ListLike.hs 2016-07-23 19:19:23.000000000 +0200 @@ -29,7 +29,7 @@ -- * Creation & Basic Functions empty, singleton, - cons, snoc, append, head, last, tail, init, null, length, + cons, snoc, append, uncons, head, last, tail, init, null, length, -- * List transformations map, rigidMap, reverse, intersperse, -- ** Conversions @@ -55,6 +55,8 @@ group, inits, tails, -- ** Predicates isPrefixOf, isSuffixOf, isInfixOf, + -- ** Modify based on predicate + stripPrefix, stripSuffix, -- * Searching lists -- ** Searching by equality elem, notElem, @@ -95,6 +97,7 @@ -- ** ByteStrings -- $notesbytestring + Chars(..), CharString (..), CharStringLazy (..), @@ -118,6 +121,7 @@ splitAt, elem, notElem, unzip, lines, words, unlines, unwords, foldMap) import Data.ListLike.Base +import Data.ListLike.Chars import Data.ListLike.CharString import Data.ListLike.FoldableLL import Data.ListLike.Instances() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/testsrc/TestInfrastructure.hs new/ListLike-4.5/testsrc/TestInfrastructure.hs --- old/ListLike-4.2.1/testsrc/TestInfrastructure.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/testsrc/TestInfrastructure.hs 2016-07-23 19:19:23.000000000 +0200 @@ -25,6 +25,7 @@ import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import qualified Data.ListLike as LL +import qualified Data.ListLike.Chars as Chars import qualified Data.Array as A import qualified Data.DList as DL import qualified Data.FMList as FM @@ -32,6 +33,8 @@ import qualified Data.Foldable as F import qualified Data.Text as T import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Builder as TB +import qualified Data.String.UTF8 as UTF8 import qualified Data.Vector as V import qualified Data.Vector.Storable as VS import qualified Data.Vector.Unboxed as VU @@ -74,6 +77,7 @@ instance (CoArbitrary i) => CoArbitrary (FM.FMList i) where coarbitrary l = coarbitrary (LL.toList l) +#if ! MIN_VERSION_QuickCheck(2,8,2) instance (Arbitrary i) => Arbitrary (S.Seq i) where arbitrary = sized (\n -> choose (0, n) >>= myVector) where myVector n = @@ -83,6 +87,7 @@ instance (CoArbitrary i) => CoArbitrary (S.Seq i) where coarbitrary l = coarbitrary (LL.toList l) +#endif instance Arbitrary (BSL.ByteString) where arbitrary = sized (\n -> choose (0, n) >>= myVector) @@ -104,6 +109,16 @@ instance CoArbitrary (BS.ByteString) where coarbitrary l = coarbitrary (LL.toList l) +instance Arbitrary Chars.Chars where + arbitrary = sized (\n -> choose (0, n) >>= myVector) + where myVector n = + do arblist <- vector n + return (LL.fromList arblist) + shrink = map LL.fromList . shrink . LL.toList + +instance CoArbitrary Chars.Chars where + coarbitrary l = coarbitrary (LL.toList l) + instance Arbitrary i => Arbitrary (A.Array Int i) where arbitrary = sized (\n -> choose (0, n) >>= myVector) where myVector n = @@ -134,6 +149,36 @@ instance CoArbitrary (TL.Text) where coarbitrary l = coarbitrary (LL.toList l) +instance Arbitrary (TB.Builder) where + arbitrary = sized (\n -> choose (0, n) >>= myVector) + where myVector n = + do arblist <- vector n + return (LL.fromList arblist) + shrink = map LL.fromList . shrink . LL.toList + +instance CoArbitrary (TB.Builder) where + coarbitrary l = coarbitrary (LL.toList l) + +instance Arbitrary (UTF8.UTF8 BS.ByteString) where + arbitrary = sized (\n -> choose (0, n) >>= myVector) + where myVector n = + do arblist <- vector n + return (LL.fromList arblist) + shrink = map LL.fromList . shrink . LL.toList + +instance CoArbitrary (UTF8.UTF8 BS.ByteString) where + coarbitrary l = coarbitrary (LL.toList l) + +instance Arbitrary (UTF8.UTF8 BSL.ByteString) where + arbitrary = sized (\n -> choose (0, n) >>= myVector) + where myVector n = + do arblist <- vector n + return (LL.fromList arblist) + shrink = map LL.fromList . shrink . LL.toList + +instance CoArbitrary (UTF8.UTF8 BSL.ByteString) where + coarbitrary l = coarbitrary (LL.toList l) + instance Arbitrary i => Arbitrary (V.Vector i) where arbitrary = sized (\n -> choose (0, n) >>= myVector) where myVector n = @@ -183,6 +228,8 @@ instance TestLL BSL.ByteString Word8 where +instance TestLL Chars.Chars Char where + instance (Arbitrary a, Show a, Eq a) => TestLL (S.Seq a) a where instance (Arbitrary a, Show a, Eq a) => TestLL (A.Array Int a) a where @@ -191,6 +238,12 @@ instance TestLL TL.Text Char where +instance TestLL TB.Builder Char where + +instance TestLL (UTF8.UTF8 BS.ByteString) Char where + +instance TestLL (UTF8.UTF8 BSL.ByteString) Char where + instance (Arbitrary a, Show a, Eq a) => TestLL (V.Vector a) a where instance (Arbitrary a, Show a, Eq a, VS.Storable a) => TestLL (VS.Vector a) a where @@ -280,8 +333,8 @@ wwrap "wrap MyList (MyList Int)" (x::LLWrap (MyList (MyList Int)) (MyList Int) Int), wwrap "wrap S.Seq (S.Seq Int)" (x::LLWrap (S.Seq (S.Seq Int)) (S.Seq Int) Int), wwrap "wrap Array (Array Int)" (x::LLWrap (A.Array Int (A.Array Int Int)) (A.Array Int Int) Int), - wwrap "wrap Array [Int]" (x::LLWrap (A.Array Int [Int]) [Int] Int), - wwrap "wrap (Vector (Vector Int))" (x::LLWrap (V.Vector (V.Vector Int)) (V.Vector Int) Int) + wwrap "wrap Array [Int]" (x::LLWrap (A.Array Int [Int]) [Int] Int) + ,wwrap "wrap (Vector (Vector Int))" (x::LLWrap (V.Vector (V.Vector Int)) (V.Vector Int) Int) ] -- | all props, 1 args: full @@ -294,6 +347,7 @@ w "MyList Bool" (x::LLTest (MyList Bool) Bool), w "ByteString" (x::LLTest BS.ByteString Word8), w "ByteString.Lazy" (x::LLTest BSL.ByteString Word8), + w "Chars" (x::LLTest Chars.Chars Char), w "Sequence Int" (x::LLTest (S.Seq Int) Int), w "Sequence Bool" (x::LLTest (S.Seq Bool) Bool), w "Sequence Char" (x::LLTest (S.Seq Char) Char), @@ -309,7 +363,10 @@ w "StorableVector Bool" (x::LLTest (VS.Vector Bool) Bool), w "UnboxVector Bool" (x::LLTest (VU.Vector Bool) Bool), w "Text" (x::LLTest T.Text Char), - w "Text.Lazy" (x::LLTest TL.Text Char) + w "Text.Lazy" (x::LLTest TL.Text Char), + w "Text.Builder" (x::LLTest TB.Builder Char), + w "UTF8 ByteString" (x::LLTest (UTF8.UTF8 BS.ByteString) Char), + w "UTF8 ByteString.Lazy" (x::LLTest (UTF8.UTF8 BSL.ByteString) Char) ] -- | all props, 1 args: full @@ -322,9 +379,13 @@ -- w "FMList Char" (x::LLTest (FM.FMList Char) Char), w "ByteString" (x::LLTest BS.ByteString Word8), w "ByteString.Lazy" (x::LLTest BSL.ByteString Word8), + w "Chars" (x::LLTest Chars.Chars Char), w "Array Int Char" (x::LLTest (A.Array Int Char) Char), w "Text" (x::LLTest T.Text Char), w "Text.Lazy" (x::LLTest TL.Text Char), - w "Vector Char" (x::LLTest (V.Vector Char) Char), + w "Text.Builder" (x::LLTest TB.Builder Char), + w "UTF8 ByteString" (x::LLTest (UTF8.UTF8 BS.ByteString) Char), + w "UTF8 ByteString.Lazy" (x::LLTest (UTF8.UTF8 BSL.ByteString) Char) + ,w "Vector Char" (x::LLTest (V.Vector Char) Char), w "Vector.Unbox Char" (x::LLTest (VU.Vector Char) Char) ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ListLike-4.2.1/testsrc/runtests.hs new/ListLike-4.5/testsrc/runtests.hs --- old/ListLike-4.2.1/testsrc/runtests.hs 2015-10-11 16:22:02.000000000 +0200 +++ new/ListLike-4.5/testsrc/runtests.hs 2016-07-23 19:19:23.000000000 +0200 @@ -17,6 +17,7 @@ -} module Main where +import Control.Applicative import Test.QuickCheck import qualified Data.ListLike as LL import qualified Data.Foldable as F @@ -110,6 +111,11 @@ (isSuffixOf (LL.toList f1) (LL.toList f2)) prop_isInfixOf f1 f2 = LL.isInfixOf f1 f2 == (isInfixOf (LL.toList f1) (LL.toList f2)) +prop_stripPrefix f1 f2 = (LL.toList <$> LL.stripPrefix f1 f2) == + (stripPrefix (LL.toList f1) (LL.toList f2)) +prop_stripPrefix2 f1 f2 = (LL.toList <$> LL.stripPrefix f1 (f1 <> f2)) == + (stripPrefix (LL.toList f1) (LL.toList $ f1 <> f2)) +prop_stripSuffix f1 f2 = LL.stripSuffix f1 (f2 <> f1) == Just f2 prop_elem f i = LL.elem i f == elem i (LL.toList f) prop_notElem f i = LL.notElem i f == notElem i (LL.toList f) prop_find f func = LL.find func f == find func (LL.toList f) @@ -269,6 +275,9 @@ apf "isPrefixOf" (t prop_isPrefixOf), apf "isSuffixOf" (t prop_isSuffixOf), apf "isInfixOf" (t prop_isInfixOf), + apf "stripPrefix" (t prop_stripPrefix), + apf "stripPrefix2" (t prop_stripPrefix2), + apf "stripSuffix" (t prop_stripSuffix), apf "elem" (t prop_elem), apf "notElem" (t prop_notElem), apf "find" (t prop_find),