extra 1.6.16 → 1.6.17
raw patch · 5 files changed
+13/−2 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.List.Extra: enumerate :: (Enum a, Bounded a) => [a]
+ Extra: enumerate :: (Enum a, Bounded a) => [a]
Files
- CHANGES.txt +2/−0
- extra.cabal +1/−1
- src/Data/List/Extra.hs +8/−0
- src/Extra.hs +1/−1
- test/TestGen.hs +1/−0
CHANGES.txt view
@@ -1,5 +1,7 @@ Changelog for Extra +1.6.17, released 2019-05-31+ Add enumerate 1.6.16, released 2019-05-25 Add atomicModifyIORef_ and atomicModifyIORef'_ 1.6.15, released 2019-04-22
extra.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.18 build-type: Simple name: extra-version: 1.6.16+version: 1.6.17 license: BSD3 license-file: LICENSE category: Development
src/Data/List/Extra.hs view
@@ -19,6 +19,8 @@ breakOn, breakOnEnd, splitOn, split, chunksOf, -- * Basics notNull, list, unsnoc, cons, snoc, drop1, mconcatMap,+ -- * Enum operations+ enumerate, -- * List operations groupSort, groupSortOn, groupSortBy, nubOrd, nubOrdBy, nubOrdOn,@@ -138,6 +140,12 @@ snoc :: [a] -> a -> [a] snoc xs x = xs ++ [x] ++-- | Enumerate all the values of an 'Enum', from 'minBound' to 'maxBound'.+--+-- > enumerate == [False, True]+enumerate :: (Enum a, Bounded a) => [a]+enumerate = [minBound..maxBound] -- | Take a number of elements from the end of the list. --
src/Extra.hs view
@@ -23,7 +23,7 @@ writeIORef', atomicWriteIORef', atomicModifyIORef_, atomicModifyIORef'_, -- * Data.List.Extra -- | Extra functions available in @"Data.List.Extra"@.- lower, upper, trim, trimStart, trimEnd, word1, line1, escapeHTML, escapeJSON, unescapeHTML, unescapeJSON, dropEnd, takeEnd, splitAtEnd, breakEnd, spanEnd, dropWhileEnd', takeWhileEnd, stripSuffix, stripInfix, stripInfixEnd, dropPrefix, dropSuffix, wordsBy, linesBy, breakOn, breakOnEnd, splitOn, split, chunksOf, notNull, list, unsnoc, cons, snoc, drop1, mconcatMap, groupSort, groupSortOn, groupSortBy, nubOrd, nubOrdBy, nubOrdOn, nubOn, groupOn, nubSort, nubSortBy, nubSortOn, maximumOn, minimumOn, disjoint, allSame, anySame, repeatedly, for, firstJust, concatUnzip, concatUnzip3, zipFrom, zipWithFrom, replace, merge, mergeBy,+ lower, upper, trim, trimStart, trimEnd, word1, line1, escapeHTML, escapeJSON, unescapeHTML, unescapeJSON, dropEnd, takeEnd, splitAtEnd, breakEnd, spanEnd, dropWhileEnd', takeWhileEnd, stripSuffix, stripInfix, stripInfixEnd, dropPrefix, dropSuffix, wordsBy, linesBy, breakOn, breakOnEnd, splitOn, split, chunksOf, notNull, list, unsnoc, cons, snoc, drop1, mconcatMap, enumerate, groupSort, groupSortOn, groupSortBy, nubOrd, nubOrdBy, nubOrdOn, nubOn, groupOn, nubSort, nubSortBy, nubSortOn, maximumOn, minimumOn, disjoint, allSame, anySame, repeatedly, for, firstJust, concatUnzip, concatUnzip3, zipFrom, zipWithFrom, replace, merge, mergeBy, -- * Data.List.NonEmpty.Extra -- | Extra functions available in @"Data.List.NonEmpty.Extra"@. (|:), (|>), appendl, appendr, maximum1, minimum1, maximumBy1, minimumBy1, maximumOn1, minimumOn1,
test/TestGen.hs view
@@ -101,6 +101,7 @@ testGen "\\x xs -> uncons (cons x xs) == Just (x,xs)" $ \x xs -> uncons (cons x xs) == Just (x,xs) testGen "snoc \"tes\" 't' == \"test\"" $ snoc "tes" 't' == "test" testGen "\\xs x -> unsnoc (snoc xs x) == Just (xs,x)" $ \xs x -> unsnoc (snoc xs x) == Just (xs,x)+ testGen "enumerate == [False, True]" $ enumerate == [False, True] testGen "takeEnd 3 \"hello\" == \"llo\"" $ takeEnd 3 "hello" == "llo" testGen "takeEnd 5 \"bye\" == \"bye\"" $ takeEnd 5 "bye" == "bye" testGen "takeEnd (-1) \"bye\" == \"\"" $ takeEnd (-1) "bye" == ""