zipper-extra 0.1.2.0 → 0.1.2.1
raw patch · 4 files changed
+6/−8 lines, 4 filessetup-changed
Files
- README.md +1/−1
- Setup.hs +0/−2
- src/Control/Comonad/Zipper/Extra.hs +2/−2
- zipper-extra.cabal +3/−3
README.md view
@@ -1,3 +1,3 @@ # zipper-extra -Zipper utils that weren't in `Control.Comonad.Store.Zipper`.+Zipper utils that weren't in [comonad-extras](https://hackage.haskell.org/package/comonad-extras)
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
src/Control/Comonad/Zipper/Extra.hs view
@@ -14,7 +14,6 @@ ) where import Control.Monad.Catch-import Control.Exception import Control.Comonad.Store import Control.Comonad.Store.Zipper import Data.List.Split@@ -37,7 +36,7 @@ paginate' n xs = case paginate n xs of Just x -> return x Nothing -> if n == 0 then throwM ZeroPageSize- else if length xs == 0 then throwM EmptyContentsError+ else if null xs then throwM EmptyContentsError else throwM UnknownPaginationException -- | Return the peek of the next element if it exists.@@ -59,4 +58,5 @@ displayException EmptyZipper = "Can not create an empty zipper." -- | Like `zipper` but lifted to `MonadThrow`.+zipper' :: (MonadThrow m, Traversable t) => t a -> m (Zipper t a) zipper' xs = maybe (throwM EmptyZipper) return $ zipper xs
zipper-extra.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.33.1. -- -- see: https://github.com/sol/hpack ----- hash: a2dff3a722a11cc68cda3cfaf56d455945de1a9c34ee268ad02e049c6a34886a+-- hash: efbea88d20acdb5ae2f378dea5468ec8ea1e03c4b193105398ed5499d4d25184 name: zipper-extra-version: 0.1.2.0+version: 0.1.2.1 synopsis: Zipper utils that weren't in Control.Comonad.Store.Zipper description: Adds some utility functions for and reexports Control.Comonad.Store.Zipper category: Comonads