packages feed

yesod-paginator 1.1.1.0 → 1.1.2.1

raw patch · 11 files changed

+212/−157 lines, 11 filesdep ~QuickCheckdep ~basedep ~blaze-markupPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: QuickCheck, base, blaze-markup, doctest, hspec, path-pieces, persistent, quickcheck-classes, safe, text, transformers, uri-encode, warp, yesod, yesod-core, yesod-test

API changes (from Hackage documentation)

- Yesod.Paginator.Prelude: (\\) :: Eq a => [a] -> [a] -> [a]
- Yesod.Paginator.Prelude: delete :: Eq a => a -> [a] -> [a]
- Yesod.Paginator.Prelude: deleteBy :: () => (a -> a -> Bool) -> a -> [a] -> [a]
- Yesod.Paginator.Prelude: deleteFirstsBy :: () => (a -> a -> Bool) -> [a] -> [a] -> [a]
- Yesod.Paginator.Prelude: dropWhileEnd :: () => (a -> Bool) -> [a] -> [a]
- Yesod.Paginator.Prelude: elemIndex :: Eq a => a -> [a] -> Maybe Int
- Yesod.Paginator.Prelude: elemIndices :: Eq a => a -> [a] -> [Int]
- Yesod.Paginator.Prelude: find :: Foldable t => (a -> Bool) -> t a -> Maybe a
- Yesod.Paginator.Prelude: findIndex :: () => (a -> Bool) -> [a] -> Maybe Int
- Yesod.Paginator.Prelude: findIndices :: () => (a -> Bool) -> [a] -> [Int]
- Yesod.Paginator.Prelude: foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b
- Yesod.Paginator.Prelude: foldl1' :: () => (a -> a -> a) -> [a] -> a
- Yesod.Paginator.Prelude: genericIndex :: Integral i => [a] -> i -> a
- Yesod.Paginator.Prelude: genericSplitAt :: Integral i => i -> [a] -> ([a], [a])
- Yesod.Paginator.Prelude: group :: Eq a => [a] -> [[a]]
- Yesod.Paginator.Prelude: groupBy :: () => (a -> a -> Bool) -> [a] -> [[a]]
- Yesod.Paginator.Prelude: infix 5 \\
- Yesod.Paginator.Prelude: inits :: () => [a] -> [[a]]
- Yesod.Paginator.Prelude: insert :: Ord a => a -> [a] -> [a]
- Yesod.Paginator.Prelude: insertBy :: () => (a -> a -> Ordering) -> a -> [a] -> [a]
- Yesod.Paginator.Prelude: intercalate :: () => [a] -> [[a]] -> [a]
- Yesod.Paginator.Prelude: intersect :: Eq a => [a] -> [a] -> [a]
- Yesod.Paginator.Prelude: intersectBy :: () => (a -> a -> Bool) -> [a] -> [a] -> [a]
- Yesod.Paginator.Prelude: intersperse :: () => a -> [a] -> [a]
- Yesod.Paginator.Prelude: isInfixOf :: Eq a => [a] -> [a] -> Bool
- Yesod.Paginator.Prelude: isPrefixOf :: Eq a => [a] -> [a] -> Bool
- Yesod.Paginator.Prelude: isSubsequenceOf :: Eq a => [a] -> [a] -> Bool
- Yesod.Paginator.Prelude: isSuffixOf :: Eq a => [a] -> [a] -> Bool
- Yesod.Paginator.Prelude: iterate' :: () => (a -> a) -> a -> [a]
- Yesod.Paginator.Prelude: mapAccumL :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
- Yesod.Paginator.Prelude: mapAccumR :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
- Yesod.Paginator.Prelude: maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a
- Yesod.Paginator.Prelude: minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a
- Yesod.Paginator.Prelude: nub :: Eq a => [a] -> [a]
- Yesod.Paginator.Prelude: partition :: () => (a -> Bool) -> [a] -> ([a], [a])
- Yesod.Paginator.Prelude: permutations :: () => [a] -> [[a]]
- Yesod.Paginator.Prelude: scanl' :: () => (b -> a -> b) -> b -> [a] -> [b]
- Yesod.Paginator.Prelude: sort :: Ord a => [a] -> [a]
- Yesod.Paginator.Prelude: sortBy :: () => (a -> a -> Ordering) -> [a] -> [a]
- Yesod.Paginator.Prelude: sortOn :: Ord b => (a -> b) -> [a] -> [a]
- Yesod.Paginator.Prelude: stripPrefix :: Eq a => [a] -> [a] -> Maybe [a]
- Yesod.Paginator.Prelude: subsequences :: () => [a] -> [[a]]
- Yesod.Paginator.Prelude: tails :: () => [a] -> [[a]]
- Yesod.Paginator.Prelude: transpose :: () => [[a]] -> [[a]]
- Yesod.Paginator.Prelude: uncons :: () => [a] -> Maybe (a, [a])
- Yesod.Paginator.Prelude: unfoldr :: () => (b -> Maybe (a, b)) -> b -> [a]
- Yesod.Paginator.Prelude: union :: Eq a => [a] -> [a] -> [a]
- Yesod.Paginator.Prelude: unionBy :: () => (a -> a -> Bool) -> [a] -> [a] -> [a]
- Yesod.Paginator.Prelude: unzip4 :: () => [(a, b, c, d)] -> ([a], [b], [c], [d])
- Yesod.Paginator.Prelude: unzip5 :: () => [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e])
- Yesod.Paginator.Prelude: unzip6 :: () => [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f])
- Yesod.Paginator.Prelude: unzip7 :: () => [(a, b, c, d, e, f, g)] -> ([a], [b], [c], [d], [e], [f], [g])
- Yesod.Paginator.Prelude: zip4 :: () => [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)]
- Yesod.Paginator.Prelude: zip5 :: () => [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)]
- Yesod.Paginator.Prelude: zip6 :: () => [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)]
- Yesod.Paginator.Prelude: zip7 :: () => [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)]
- Yesod.Paginator.Prelude: zipWith4 :: () => (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e]
- Yesod.Paginator.Prelude: zipWith5 :: () => (a -> b -> c -> d -> e -> f) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f]
- Yesod.Paginator.Prelude: zipWith6 :: () => (a -> b -> c -> d -> e -> f -> g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g]
- Yesod.Paginator.Prelude: zipWith7 :: () => (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h]
+ Yesod.Paginator.Prelude: class Monad m => MonadFail (m :: Type -> Type)
- Yesod.Paginator.Prelude: (!!) :: () => [a] -> Int -> a
+ Yesod.Paginator.Prelude: (!!) :: [a] -> Int -> a
- Yesod.Paginator.Prelude: ($!) :: () => (a -> b) -> a -> b
+ Yesod.Paginator.Prelude: ($!) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- Yesod.Paginator.Prelude: ($) :: () => (a -> b) -> a -> b
+ Yesod.Paginator.Prelude: ($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b
- Yesod.Paginator.Prelude: (++) :: () => [a] -> [a] -> [a]
+ Yesod.Paginator.Prelude: (++) :: [a] -> [a] -> [a]
- Yesod.Paginator.Prelude: (.) :: () => (b -> c) -> (a -> b) -> a -> c
+ Yesod.Paginator.Prelude: (.) :: (b -> c) -> (a -> b) -> a -> c
- Yesod.Paginator.Prelude: asTypeOf :: () => a -> a -> a
+ Yesod.Paginator.Prelude: asTypeOf :: a -> a -> a
- Yesod.Paginator.Prelude: atDef :: () => a -> [a] -> Int -> a
+ Yesod.Paginator.Prelude: atDef :: a -> [a] -> Int -> a
- Yesod.Paginator.Prelude: atMay :: () => [a] -> Int -> Maybe a
+ Yesod.Paginator.Prelude: atMay :: [a] -> Int -> Maybe a
- Yesod.Paginator.Prelude: break :: () => (a -> Bool) -> [a] -> ([a], [a])
+ Yesod.Paginator.Prelude: break :: (a -> Bool) -> [a] -> ([a], [a])
- Yesod.Paginator.Prelude: catMaybes :: () => [Maybe a] -> [a]
+ Yesod.Paginator.Prelude: catMaybes :: [Maybe a] -> [a]
- Yesod.Paginator.Prelude: const :: () => a -> b -> a
+ Yesod.Paginator.Prelude: const :: a -> b -> a
- Yesod.Paginator.Prelude: curry :: () => ((a, b) -> c) -> a -> b -> c
+ Yesod.Paginator.Prelude: curry :: ((a, b) -> c) -> a -> b -> c
- Yesod.Paginator.Prelude: cycle :: () => [a] -> [a]
+ Yesod.Paginator.Prelude: cycle :: [a] -> [a]
- Yesod.Paginator.Prelude: cycleDef :: () => [a] -> [a] -> [a]
+ Yesod.Paginator.Prelude: cycleDef :: [a] -> [a] -> [a]
- Yesod.Paginator.Prelude: cycleMay :: () => [a] -> Maybe [a]
+ Yesod.Paginator.Prelude: cycleMay :: [a] -> Maybe [a]
- Yesod.Paginator.Prelude: drop :: () => Int -> [a] -> [a]
+ Yesod.Paginator.Prelude: drop :: Int -> [a] -> [a]
- Yesod.Paginator.Prelude: dropWhile :: () => (a -> Bool) -> [a] -> [a]
+ Yesod.Paginator.Prelude: dropWhile :: (a -> Bool) -> [a] -> [a]
- Yesod.Paginator.Prelude: either :: () => (a -> c) -> (b -> c) -> Either a b -> c
+ Yesod.Paginator.Prelude: either :: (a -> c) -> (b -> c) -> Either a b -> c
- Yesod.Paginator.Prelude: error :: HasCallStack => [Char] -> a
+ Yesod.Paginator.Prelude: error :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => [Char] -> a
- Yesod.Paginator.Prelude: errorWithoutStackTrace :: () => [Char] -> a
+ Yesod.Paginator.Prelude: errorWithoutStackTrace :: forall (r :: RuntimeRep) (a :: TYPE r). [Char] -> a
- Yesod.Paginator.Prelude: fail :: Monad m => String -> m a
+ Yesod.Paginator.Prelude: fail :: MonadFail m => String -> m a
- Yesod.Paginator.Prelude: filter :: () => (a -> Bool) -> [a] -> [a]
+ Yesod.Paginator.Prelude: filter :: (a -> Bool) -> [a] -> [a]
- Yesod.Paginator.Prelude: findIndexJust :: () => (a -> Bool) -> [a] -> Int
+ Yesod.Paginator.Prelude: findIndexJust :: (a -> Bool) -> [a] -> Int
- Yesod.Paginator.Prelude: findIndexJustDef :: () => Int -> (a -> Bool) -> [a] -> Int
+ Yesod.Paginator.Prelude: findIndexJustDef :: Int -> (a -> Bool) -> [a] -> Int
- Yesod.Paginator.Prelude: findJust :: () => (a -> Bool) -> [a] -> a
+ Yesod.Paginator.Prelude: findJust :: (a -> Bool) -> [a] -> a
- Yesod.Paginator.Prelude: findJustDef :: () => a -> (a -> Bool) -> [a] -> a
+ Yesod.Paginator.Prelude: findJustDef :: a -> (a -> Bool) -> [a] -> a
- Yesod.Paginator.Prelude: flip :: () => (a -> b -> c) -> b -> a -> c
+ Yesod.Paginator.Prelude: flip :: (a -> b -> c) -> b -> a -> c
- Yesod.Paginator.Prelude: foldl1Def :: () => a -> (a -> a -> a) -> [a] -> a
+ Yesod.Paginator.Prelude: foldl1Def :: a -> (a -> a -> a) -> [a] -> a
- Yesod.Paginator.Prelude: foldl1Def' :: () => a -> (a -> a -> a) -> [a] -> a
+ Yesod.Paginator.Prelude: foldl1Def' :: a -> (a -> a -> a) -> [a] -> a
- Yesod.Paginator.Prelude: foldl1May :: () => (a -> a -> a) -> [a] -> Maybe a
+ Yesod.Paginator.Prelude: foldl1May :: (a -> a -> a) -> [a] -> Maybe a
- Yesod.Paginator.Prelude: foldl1May' :: () => (a -> a -> a) -> [a] -> Maybe a
+ Yesod.Paginator.Prelude: foldl1May' :: (a -> a -> a) -> [a] -> Maybe a
- Yesod.Paginator.Prelude: foldr1Def :: () => a -> (a -> a -> a) -> [a] -> a
+ Yesod.Paginator.Prelude: foldr1Def :: a -> (a -> a -> a) -> [a] -> a
- Yesod.Paginator.Prelude: foldr1May :: () => (a -> a -> a) -> [a] -> Maybe a
+ Yesod.Paginator.Prelude: foldr1May :: (a -> a -> a) -> [a] -> Maybe a
- Yesod.Paginator.Prelude: fromJust :: () => Maybe a -> a
+ Yesod.Paginator.Prelude: fromJust :: HasCallStack => Maybe a -> a
- Yesod.Paginator.Prelude: fromJustDef :: () => a -> Maybe a -> a
+ Yesod.Paginator.Prelude: fromJustDef :: a -> Maybe a -> a
- Yesod.Paginator.Prelude: fromMaybe :: () => a -> Maybe a -> a
+ Yesod.Paginator.Prelude: fromMaybe :: a -> Maybe a -> a
- Yesod.Paginator.Prelude: fst :: () => (a, b) -> a
+ Yesod.Paginator.Prelude: fst :: (a, b) -> a
- Yesod.Paginator.Prelude: head :: () => [a] -> a
+ Yesod.Paginator.Prelude: head :: [a] -> a
- Yesod.Paginator.Prelude: headDef :: () => a -> [a] -> a
+ Yesod.Paginator.Prelude: headDef :: a -> [a] -> a
- Yesod.Paginator.Prelude: headMay :: () => [a] -> Maybe a
+ Yesod.Paginator.Prelude: headMay :: [a] -> Maybe a
- Yesod.Paginator.Prelude: id :: () => a -> a
+ Yesod.Paginator.Prelude: id :: a -> a
- Yesod.Paginator.Prelude: infixl 6 -
+ Yesod.Paginator.Prelude: infixl 6 +
- Yesod.Paginator.Prelude: init :: () => [a] -> [a]
+ Yesod.Paginator.Prelude: init :: [a] -> [a]
- Yesod.Paginator.Prelude: initDef :: () => [a] -> [a] -> [a]
+ Yesod.Paginator.Prelude: initDef :: [a] -> [a] -> [a]
- Yesod.Paginator.Prelude: initMay :: () => [a] -> Maybe [a]
+ Yesod.Paginator.Prelude: initMay :: [a] -> Maybe [a]
- Yesod.Paginator.Prelude: initSafe :: () => [a] -> [a]
+ Yesod.Paginator.Prelude: initSafe :: [a] -> [a]
- Yesod.Paginator.Prelude: ioError :: () => IOError -> IO a
+ Yesod.Paginator.Prelude: ioError :: IOError -> IO a
- Yesod.Paginator.Prelude: isJust :: () => Maybe a -> Bool
+ Yesod.Paginator.Prelude: isJust :: Maybe a -> Bool
- Yesod.Paginator.Prelude: isNothing :: () => Maybe a -> Bool
+ Yesod.Paginator.Prelude: isNothing :: Maybe a -> Bool
- Yesod.Paginator.Prelude: iterate :: () => (a -> a) -> a -> [a]
+ Yesod.Paginator.Prelude: iterate :: (a -> a) -> a -> [a]
- Yesod.Paginator.Prelude: last :: () => [a] -> a
+ Yesod.Paginator.Prelude: last :: [a] -> a
- Yesod.Paginator.Prelude: lastDef :: () => a -> [a] -> a
+ Yesod.Paginator.Prelude: lastDef :: a -> [a] -> a
- Yesod.Paginator.Prelude: lastMay :: () => [a] -> Maybe a
+ Yesod.Paginator.Prelude: lastMay :: [a] -> Maybe a
- Yesod.Paginator.Prelude: listToMaybe :: () => [a] -> Maybe a
+ Yesod.Paginator.Prelude: listToMaybe :: [a] -> Maybe a
- Yesod.Paginator.Prelude: map :: () => (a -> b) -> [a] -> [b]
+ Yesod.Paginator.Prelude: map :: (a -> b) -> [a] -> [b]
- Yesod.Paginator.Prelude: mapMaybe :: () => (a -> Maybe b) -> [a] -> [b]
+ Yesod.Paginator.Prelude: mapMaybe :: (a -> Maybe b) -> [a] -> [b]
- Yesod.Paginator.Prelude: maximumBoundBy :: () => a -> (a -> a -> Ordering) -> [a] -> a
+ Yesod.Paginator.Prelude: maximumBoundBy :: a -> (a -> a -> Ordering) -> [a] -> a
- Yesod.Paginator.Prelude: maximumByDef :: () => a -> (a -> a -> Ordering) -> [a] -> a
+ Yesod.Paginator.Prelude: maximumByDef :: a -> (a -> a -> Ordering) -> [a] -> a
- Yesod.Paginator.Prelude: maximumByMay :: () => (a -> a -> Ordering) -> [a] -> Maybe a
+ Yesod.Paginator.Prelude: maximumByMay :: (a -> a -> Ordering) -> [a] -> Maybe a
- Yesod.Paginator.Prelude: maybe :: () => b -> (a -> b) -> Maybe a -> b
+ Yesod.Paginator.Prelude: maybe :: b -> (a -> b) -> Maybe a -> b
- Yesod.Paginator.Prelude: maybeToList :: () => Maybe a -> [a]
+ Yesod.Paginator.Prelude: maybeToList :: Maybe a -> [a]
- Yesod.Paginator.Prelude: minimumBoundBy :: () => a -> (a -> a -> Ordering) -> [a] -> a
+ Yesod.Paginator.Prelude: minimumBoundBy :: a -> (a -> a -> Ordering) -> [a] -> a
- Yesod.Paginator.Prelude: minimumByDef :: () => a -> (a -> a -> Ordering) -> [a] -> a
+ Yesod.Paginator.Prelude: minimumByDef :: a -> (a -> a -> Ordering) -> [a] -> a
- Yesod.Paginator.Prelude: minimumByMay :: () => (a -> a -> Ordering) -> [a] -> Maybe a
+ Yesod.Paginator.Prelude: minimumByMay :: (a -> a -> Ordering) -> [a] -> Maybe a
- Yesod.Paginator.Prelude: nubBy :: () => (a -> a -> Bool) -> [a] -> [a]
+ Yesod.Paginator.Prelude: nubBy :: (a -> a -> Bool) -> [a] -> [a]
- Yesod.Paginator.Prelude: readParen :: () => Bool -> ReadS a -> ReadS a
+ Yesod.Paginator.Prelude: readParen :: Bool -> ReadS a -> ReadS a
- Yesod.Paginator.Prelude: repeat :: () => a -> [a]
+ Yesod.Paginator.Prelude: repeat :: a -> [a]
- Yesod.Paginator.Prelude: replicate :: () => Int -> a -> [a]
+ Yesod.Paginator.Prelude: replicate :: Int -> a -> [a]
- Yesod.Paginator.Prelude: reverse :: () => [a] -> [a]
+ Yesod.Paginator.Prelude: reverse :: [a] -> [a]
- Yesod.Paginator.Prelude: scanl :: () => (b -> a -> b) -> b -> [a] -> [b]
+ Yesod.Paginator.Prelude: scanl :: (b -> a -> b) -> b -> [a] -> [b]
- Yesod.Paginator.Prelude: scanl1 :: () => (a -> a -> a) -> [a] -> [a]
+ Yesod.Paginator.Prelude: scanl1 :: (a -> a -> a) -> [a] -> [a]
- Yesod.Paginator.Prelude: scanl1Def :: () => [a] -> (a -> a -> a) -> [a] -> [a]
+ Yesod.Paginator.Prelude: scanl1Def :: [a] -> (a -> a -> a) -> [a] -> [a]
- Yesod.Paginator.Prelude: scanl1May :: () => (a -> a -> a) -> [a] -> Maybe [a]
+ Yesod.Paginator.Prelude: scanl1May :: (a -> a -> a) -> [a] -> Maybe [a]
- Yesod.Paginator.Prelude: scanr :: () => (a -> b -> b) -> b -> [a] -> [b]
+ Yesod.Paginator.Prelude: scanr :: (a -> b -> b) -> b -> [a] -> [b]
- Yesod.Paginator.Prelude: scanr1 :: () => (a -> a -> a) -> [a] -> [a]
+ Yesod.Paginator.Prelude: scanr1 :: (a -> a -> a) -> [a] -> [a]
- Yesod.Paginator.Prelude: scanr1Def :: () => [a] -> (a -> a -> a) -> [a] -> [a]
+ Yesod.Paginator.Prelude: scanr1Def :: [a] -> (a -> a -> a) -> [a] -> [a]
- Yesod.Paginator.Prelude: scanr1May :: () => (a -> a -> a) -> [a] -> Maybe [a]
+ Yesod.Paginator.Prelude: scanr1May :: (a -> a -> a) -> [a] -> Maybe [a]
- Yesod.Paginator.Prelude: seq :: () => a -> b -> b
+ Yesod.Paginator.Prelude: seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b
- Yesod.Paginator.Prelude: snd :: () => (a, b) -> b
+ Yesod.Paginator.Prelude: snd :: (a, b) -> b
- Yesod.Paginator.Prelude: span :: () => (a -> Bool) -> [a] -> ([a], [a])
+ Yesod.Paginator.Prelude: span :: (a -> Bool) -> [a] -> ([a], [a])
- Yesod.Paginator.Prelude: splitAt :: () => Int -> [a] -> ([a], [a])
+ Yesod.Paginator.Prelude: splitAt :: Int -> [a] -> ([a], [a])
- Yesod.Paginator.Prelude: tail :: () => [a] -> [a]
+ Yesod.Paginator.Prelude: tail :: [a] -> [a]
- Yesod.Paginator.Prelude: tailDef :: () => [a] -> [a] -> [a]
+ Yesod.Paginator.Prelude: tailDef :: [a] -> [a] -> [a]
- Yesod.Paginator.Prelude: tailMay :: () => [a] -> Maybe [a]
+ Yesod.Paginator.Prelude: tailMay :: [a] -> Maybe [a]
- Yesod.Paginator.Prelude: tailSafe :: () => [a] -> [a]
+ Yesod.Paginator.Prelude: tailSafe :: [a] -> [a]
- Yesod.Paginator.Prelude: take :: () => Int -> [a] -> [a]
+ Yesod.Paginator.Prelude: take :: Int -> [a] -> [a]
- Yesod.Paginator.Prelude: takeWhile :: () => (a -> Bool) -> [a] -> [a]
+ Yesod.Paginator.Prelude: takeWhile :: (a -> Bool) -> [a] -> [a]
- Yesod.Paginator.Prelude: uncurry :: () => (a -> b -> c) -> (a, b) -> c
+ Yesod.Paginator.Prelude: uncurry :: (a -> b -> c) -> (a, b) -> c
- Yesod.Paginator.Prelude: undefined :: HasCallStack => a
+ Yesod.Paginator.Prelude: undefined :: forall (r :: RuntimeRep) (a :: TYPE r). HasCallStack => a
- Yesod.Paginator.Prelude: until :: () => (a -> Bool) -> (a -> a) -> a -> a
+ Yesod.Paginator.Prelude: until :: (a -> Bool) -> (a -> a) -> a -> a
- Yesod.Paginator.Prelude: unzip :: () => [(a, b)] -> ([a], [b])
+ Yesod.Paginator.Prelude: unzip :: [(a, b)] -> ([a], [b])
- Yesod.Paginator.Prelude: unzip3 :: () => [(a, b, c)] -> ([a], [b], [c])
+ Yesod.Paginator.Prelude: unzip3 :: [(a, b, c)] -> ([a], [b], [c])
- Yesod.Paginator.Prelude: zip :: () => [a] -> [b] -> [(a, b)]
+ Yesod.Paginator.Prelude: zip :: [a] -> [b] -> [(a, b)]
- Yesod.Paginator.Prelude: zip3 :: () => [a] -> [b] -> [c] -> [(a, b, c)]
+ Yesod.Paginator.Prelude: zip3 :: [a] -> [b] -> [c] -> [(a, b, c)]
- Yesod.Paginator.Prelude: zipWith :: () => (a -> b -> c) -> [a] -> [b] -> [c]
+ Yesod.Paginator.Prelude: zipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
- Yesod.Paginator.Prelude: zipWith3 :: () => (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
+ Yesod.Paginator.Prelude: zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]

Files

LICENSE view
@@ -1,30 +1,19 @@-Copyright (c)2010, Patrick Brisbin--All rights reserved.--Redistribution and use in source and binary forms, with or without-modification, are permitted provided that the following conditions are met:--    * Redistributions of source code must retain the above copyright-      notice, this list of conditions and the following disclaimer.+Copyright (c) 2021 Pat Brisbin <pbrisbin@gmail.com> -    * Redistributions in binary form must reproduce the above-      copyright notice, this list of conditions and the following-      disclaimer in the documentation and/or other materials provided-      with the distribution.+Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions: -    * Neither the name of Patrick Brisbin nor the names of other-      contributors may be used to endorse or promote products derived-      from this software without specific prior written permission.+The above copyright notice and this permission notice shall be included in+all copies or substantial portions of the Software. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+THE SOFTWARE.
doctest/Main.hs view
@@ -1,4 +1,8 @@-module Main (main) where+module Main+    ( main+    ) where++import Prelude  import Test.DocTest 
example/Main.hs view
@@ -3,10 +3,16 @@ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-}-{-# OPTIONS_GHC -fno-warn-unused-top-binds #-}+{-# OPTIONS_GHC -Wno-missing-deriving-strategies #-}+{-# OPTIONS_GHC -Wno-missing-local-signatures #-}+{-# OPTIONS_GHC -Wno-unused-top-binds #-} -module Main (main) where+module Main+    ( main+    ) where +import Prelude+ import Network.Wai.Handler.Warp (run) import Yesod import Yesod.Paginator@@ -37,7 +43,7 @@  getRootR :: Handler Html getRootR = do-    let things' = [1..1142] :: [Int]+    let things' = [1 .. 1142] :: [Int]      pages <- paginate 3 things' 
src/Yesod/Paginator/Pages.hs view
@@ -31,8 +31,7 @@     , takeNextPages     , getPreviousPage     , getNextPage-    )-where+    ) where  import Yesod.Paginator.Prelude @@ -40,22 +39,19 @@ import Web.PathPieces  newtype PageNumber = PageNumber Natural-    deriving (Enum, Eq, Integral, Num, Ord, Real)-    deriving newtype (Show, ToMarkup)+    deriving newtype (Enum, Eq, Integral, Num, Ord, Real, Show, ToMarkup)  newtype PerPage = PerPage Natural-    deriving (Enum, Eq, Integral, Num, Ord, Real)-    deriving newtype (Read, Show, PathPiece)+    deriving newtype (Enum, Eq, Integral, Num, Ord, Real, Read, Show, PathPiece)  newtype ItemsCount = ItemsCount Natural-    deriving (Enum, Eq, Integral, Num, Ord, Real)-    deriving newtype (Read, Show, PathPiece)+    deriving newtype (Enum, Eq, Integral, Num, Ord, Real, Read, Show, PathPiece)  data Page a = Page     { pageItems :: [a]     , pageNumber :: PageNumber     }-    deriving (Eq, Show)+    deriving stock (Eq, Show)  setPageItems :: Page a -> [b] -> Page b setPageItems page items = page { pageItems = items }@@ -82,7 +78,7 @@     , pagesNext :: [PageNumber]     , pagesLast :: PageNumber     }-    deriving (Eq, Show)+    deriving stock (Eq, Show)  setPagesCurrent :: Pages a -> Page b -> Pages b setPagesCurrent pages current = pages { pagesCurrent = current }@@ -97,7 +93,8 @@     foldMap f = foldMap f . pagesCurrent  instance Traversable Pages where-    traverse f pages = setPagesCurrent pages <$> traverse f (pagesCurrent pages)+    traverse f pages =+        setPagesCurrent pages <$> traverse f (pagesCurrent pages)  -- | Take previous pages, going back from current --@@ -168,6 +165,7 @@ getLastPage :: ItemsCount -> PerPage -> PageNumber getLastPage total = fromIntegral . carry . (total `divMod`) . fromIntegral   where+    carry :: (Eq a, Num a) => (a, a) -> a     carry (q, 0) = q     carry (q, _) = q + 1 
src/Yesod/Paginator/PaginationConfig.hs view
@@ -6,8 +6,7 @@     ( PaginationConfig(..)     , PageParamName(..)     , defaultPaginationConfig-    )-where+    ) where  import Yesod.Paginator.Prelude @@ -15,13 +14,13 @@ import Yesod.Paginator.Pages  newtype PageParamName = PageParamName { unPageParamName :: Text }-    deriving (Eq)+    deriving stock Eq     deriving newtype (Read, Show, PathPiece)  data PaginationConfig = PaginationConfig-  { paginationConfigPageParamName :: PageParamName-  , paginationConfigPerPage :: PerPage-  }+    { paginationConfigPageParamName :: PageParamName+    , paginationConfigPerPage :: PerPage+    }  defaultPaginationConfig :: PaginationConfig defaultPaginationConfig = PaginationConfig
src/Yesod/Paginator/Prelude.hs view
@@ -4,13 +4,13 @@ module Yesod.Paginator.Prelude     ( module X     , module Yesod.Paginator.Prelude-    )-where+    ) where  import Prelude as X  import Control.Monad as X import Data.List as X+    (genericDrop, genericLength, genericReplicate, genericTake, nubBy) import Data.Maybe as X import Data.Text as X (Text, pack, unpack) import Numeric.Natural as X
src/Yesod/Paginator/Widgets.hs view
@@ -7,8 +7,7 @@     , simpleWith     , ellipsed     , ellipsedWith-    )-where+    ) where  import Yesod.Paginator.Prelude @@ -100,14 +99,18 @@         (mFirstPage, firstEllipses)             | pageNumber (pagesCurrent pages) == 1 = (Nothing, False)             | headMay prevPages == Just 1 = (Nothing, False)-            | headMay prevPages == Just 2 = (Just 1, False)+            | headMay prevPages == Just 2 = (Just (1 :: PageNumber), False)             | otherwise = (Just 1, True)          (mLastPage, lastEllipses)-            | pageNumber (pagesCurrent pages) == pagesLast pages = (Nothing, False)-            | lastMay nextPages == Just (pagesLast pages) = (Nothing, False)-            | lastMay nextPages == Just (pagesLast pages - 1) = (Just $ pagesLast pages, False)-            | otherwise = (Just $ pagesLast pages, True)+            | pageNumber (pagesCurrent pages) == pagesLast pages+            = (Nothing, False)+            | lastMay nextPages == Just (pagesLast pages)+            = (Nothing, False)+            | lastMay nextPages == Just (pagesLast pages - 1)+            = (Just $ pagesLast pages, False)+            | otherwise+            = (Just $ pagesLast pages, True)      [whamlet|$newline never         <ul .pagination>@@ -164,14 +167,21 @@         then (prevPagesNaive, nextPages)         else (prevPagesCalcd, nextPages)   where-    nextPages = takeNextPages (elements - genericLength prevPagesNaive - 1) pages+    nextPages =+        takeNextPages (elements - genericLength prevPagesNaive - 1) pages     prevPagesNaive = takePreviousPages (elements `div` 2) pages-    prevPagesCalcd = takePreviousPages (elements - genericLength nextPages - 1) pages+    prevPagesCalcd =+        takePreviousPages (elements - genericLength nextPages - 1) pages -getUpdateGetParams :: PageParamName -> WidgetFor site (PageNumber -> [(Text, Text)])+getUpdateGetParams+    :: PageParamName -> WidgetFor site (PageNumber -> [(Text, Text)]) getUpdateGetParams pageParamName = do     params <- handlerToWidget $ reqGetParams <$> getRequest-    pure $ \number -> nubOn fst $ [(unPageParamName pageParamName, tshow number)] <> params+    pure+        $ \number ->+              nubOn fst+                  $ [(unPageParamName pageParamName, tshow number)]+                  <> params  renderGetParams :: [(Text, Text)] -> Text renderGetParams [] = ""
test/Spec.hs view
@@ -1,1 +1,2 @@+{-# OPTIONS_GHC -Wno-missing-export-lists #-} {-# OPTIONS_GHC -F -pgmF hspec-discover #-}
test/SpecHelper.hs view
@@ -3,12 +3,12 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-}+{-# OPTIONS_GHC -Wno-missing-local-signatures #-}  module SpecHelper     ( module SpecHelper     , module X-    )-where+    ) where  import Test.Hspec as X import Yesod.Core
test/Yesod/Paginator/PagesSpec.hs view
@@ -3,9 +3,10 @@  module Yesod.Paginator.PagesSpec     ( spec-    )-where+    ) where +import Prelude+ import Data.Foldable (traverse_) import Data.Functor.Classes (Eq1(..), Show1(..)) import Data.Proxy@@ -59,5 +60,8 @@ itPreserves :: Laws -> Spec itPreserves Laws {..} = mkContext $ traverse_ (uncurry mkIt) lawsProperties   where+    mkContext :: SpecWith a -> SpecWith a     mkContext = context $ lawsTypeclass <> " laws"++    mkIt :: Example a => String -> a -> SpecWith (Arg a)     mkIt name = it $ "preserves " <> name
yesod-paginator.cabal view
@@ -1,104 +1,148 @@ cabal-version: 1.12---- This file has been generated from package.yaml by hpack version 0.31.2.------ see: https://github.com/sol/hpack------ hash: 997fa6b9ee2b93c5590ad92497cf2b628931167ff2ccdd566227408106b0e1df--name:           yesod-paginator-version:        1.1.1.0-synopsis:       A pagination approach for yesod-description:    Paginate a list showing a per-item widget and links to other pages-category:       Web, Yesod-homepage:       http://github.com/pbrisbin/yesod-paginator-author:         Patrick Brisbin-maintainer:     pbrisbin@gmail.com-license:        BSD3-license-file:   LICENSE-build-type:     Simple+name:          yesod-paginator+version:       1.1.2.1+license:       MIT+license-file:  LICENSE+maintainer:    Patrick Brisbin <pbrisbin@gmail.com>+author:        Patrick Brisbin <pbrisbin@gmail.com>+homepage:      http://github.com/pbrisbin/yesod-paginator+synopsis:      A pagination approach for yesod+description:+    Paginate a list showing a per-item widget and links to other pages -source-repository head-  type: git-  location: git://github.com/pbrisbin/yesod-paginator.git+category:      Web, Yesod+build-type:    Simple  flag examples-  description: Build the examples-  manual: False-  default: False+    description: Build the examples+    default:     False  library-  exposed-modules:-      Yesod.Paginator-      Yesod.Paginator.Pages-      Yesod.Paginator.Paginate-      Yesod.Paginator.PaginationConfig-      Yesod.Paginator.Prelude-      Yesod.Paginator.Widgets-  other-modules:-      Paths_yesod_paginator-  hs-source-dirs:-      src-  default-extensions: NoImplicitPrelude-  ghc-options: -Wall-  build-depends:-      base >4.8.0 && <5-    , blaze-markup-    , path-pieces-    , persistent >=2.5-    , safe-    , text >=0.11 && <2.0-    , transformers-    , uri-encode-    , yesod-core >=1.4-  default-language: Haskell2010+    exposed-modules:+        Yesod.Paginator+        Yesod.Paginator.Pages+        Yesod.Paginator.Paginate+        Yesod.Paginator.PaginationConfig+        Yesod.Paginator.Prelude+        Yesod.Paginator.Widgets +    hs-source-dirs:     src+    other-modules:      Paths_yesod_paginator+    default-language:   Haskell2010+    default-extensions: NoImplicitPrelude+    ghc-options:+        -Weverything -Wno-all-missed-specialisations+        -Wno-missing-import-lists -Wno-safe -Wno-unsafe++    build-depends:+        base >=4.11.1.0 && <5,+        blaze-markup >=0.8.2.2,+        path-pieces >=0.2.1,+        persistent >=2.8.2,+        safe >=0.3.17,+        text >=1.2.3.1,+        transformers >=0.5.5.0,+        uri-encode >=1.5.0.5,+        yesod-core >=1.6.9++    if impl(ghc >=9.2)+        ghc-options: -Wno-missing-kind-signatures++    if impl(ghc >=8.10)+        ghc-options:+            -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module++    if impl(ghc >=8.8)+        ghc-options: -fwrite-ide-info+ executable yesod-paginator-example-  main-is: Main.hs-  other-modules:-      Paths_yesod_paginator-  hs-source-dirs:-      example-  ghc-options: -Wall-  build-depends:-      base >4.8.0 && <5-    , warp-    , yesod-    , yesod-paginator-  if !(flag(examples))-    buildable: False-  default-language: Haskell2010+    main-is:            Main.hs+    hs-source-dirs:     example+    other-modules:      Paths_yesod_paginator+    default-language:   Haskell2010+    default-extensions: NoImplicitPrelude+    ghc-options:+        -Weverything -Wno-all-missed-specialisations+        -Wno-missing-import-lists -Wno-safe -Wno-unsafe +    build-depends:+        base >=4.11.1.0 && <5,+        warp >=3.2.25,+        yesod >=1.6.0,+        yesod-paginator -any++    if impl(ghc >=9.2)+        ghc-options: -Wno-missing-kind-signatures++    if impl(ghc >=8.10)+        ghc-options:+            -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module++    if impl(ghc >=8.8)+        ghc-options: -fwrite-ide-info++    if !flag(examples)+        buildable: False+ test-suite doctests-  type: exitcode-stdio-1.0-  main-is: Main.hs-  other-modules:-      Paths_yesod_paginator-  hs-source-dirs:-      doctest-  ghc-options: -Wall-  build-depends:-      base >4.8.0 && <5-    , doctest-  default-language: Haskell2010+    type:               exitcode-stdio-1.0+    main-is:            Main.hs+    hs-source-dirs:     doctest+    other-modules:      Paths_yesod_paginator+    default-language:   Haskell2010+    default-extensions: NoImplicitPrelude+    ghc-options:+        -Weverything -Wno-all-missed-specialisations+        -Wno-missing-import-lists -Wno-safe -Wno-unsafe +    build-depends:+        base >=4.11.1.0 && <5,+        doctest >=0.16.0.1++    if impl(ghc >=9.2)+        ghc-options: -Wno-missing-kind-signatures++    if impl(ghc >=8.10)+        ghc-options:+            -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module++    if impl(ghc >=8.8)+        ghc-options: -fwrite-ide-info+ test-suite test-  type: exitcode-stdio-1.0-  main-is: Spec.hs-  other-modules:-      SpecHelper-      Yesod.Paginator.PagesSpec-      Yesod.Paginator.WidgetsSpec-      Paths_yesod_paginator-  hs-source-dirs:-      test-  ghc-options: -Wall-  build-depends:-      QuickCheck-    , base >4.8.0 && <5-    , hspec-    , quickcheck-classes-    , yesod-core-    , yesod-paginator-    , yesod-test-  default-language: Haskell2010+    type:               exitcode-stdio-1.0+    main-is:            Spec.hs+    hs-source-dirs:     test+    other-modules:+        SpecHelper+        Yesod.Paginator.PagesSpec+        Yesod.Paginator.WidgetsSpec+        Paths_yesod_paginator++    default-language:   Haskell2010+    default-extensions: NoImplicitPrelude+    ghc-options:+        -Weverything -Wno-all-missed-specialisations+        -Wno-missing-import-lists -Wno-safe -Wno-unsafe++    build-depends:+        QuickCheck >=2.11.3,+        base >=4.11.1.0 && <5,+        hspec >=2.5.5,+        quickcheck-classes >=0.4.13,+        yesod-core >=1.6.9,+        yesod-paginator -any,+        yesod-test >=1.6.5.1++    if impl(ghc >=9.2)+        ghc-options: -Wno-missing-kind-signatures++    if impl(ghc >=8.10)+        ghc-options:+            -Wno-missing-safe-haskell-mode -Wno-prepositive-qualified-module++    if impl(ghc >=8.8)+        ghc-options: -fwrite-ide-info++    if impl(ghc >=8.8)+        ghc-options: -Wno-missing-deriving-strategies