packages feed

non-empty-zipper 0.1.0.7 → 0.1.0.8

raw patch · 2 files changed

+3/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Data/List/NonEmptyZipper.hs view
@@ -53,8 +53,8 @@ -- | Create a @NonEmptyZipper@ by taking a focused element, and list of options -- If the focused element is not in the list, we get @Nothing@. nezFromOptions :: Eq a => a -> [a] -> Maybe (NonEmptyZipper a)-nezFromOptions x xs | x `elem` xs = Just $ x |: delete x xs-nezFromOptions _ _  = Nothing+nezFromOptions x xs =+    (\i -> let (as,_:bs) = splitAt i xs in NonEmptyZipper as x bs) <$> elemIndex x xs  -- | Map to @_before@, useful as a lens before :: Functor f => ([a] -> f [a]) -> NonEmptyZipper a -> f (NonEmptyZipper a)
non-empty-zipper.cabal view
@@ -1,5 +1,5 @@ name:                non-empty-zipper-version:             0.1.0.7+version:             0.1.0.8 synopsis:            The Zipper for NonEmpty description:         The Zipper for NonEmpty. Useful for things like tabs,                      button groups, and slideshows. Basically any case in which