non-empty-zipper 0.1.0.1 → 0.1.0.2
raw patch · 2 files changed
+9/−6 lines, 2 filesdep −lensPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies removed: lens
API changes (from Hackage documentation)
- Data.List.NonEmptyZipper: after :: forall a_a7j4. Lens' (NonEmptyZipper a_a7j4) [a_a7j4]
+ Data.List.NonEmptyZipper: after :: Functor f => ([a] -> f [a]) -> NonEmptyZipper a -> f (NonEmptyZipper a)
- Data.List.NonEmptyZipper: before :: forall a_a7j4. Lens' (NonEmptyZipper a_a7j4) [a_a7j4]
+ Data.List.NonEmptyZipper: before :: Functor f => ([a] -> f [a]) -> NonEmptyZipper a -> f (NonEmptyZipper a)
- Data.List.NonEmptyZipper: current :: forall a_a7j4. Lens' (NonEmptyZipper a_a7j4) a_a7j4
+ Data.List.NonEmptyZipper: current :: Functor f => (a -> f a) -> NonEmptyZipper a -> f (NonEmptyZipper a)
Files
Data/List/NonEmptyZipper.hs view
@@ -1,7 +1,6 @@ {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE TemplateHaskell #-} ----------------------------------------------------------------------------- -- |@@ -19,7 +18,6 @@ module Data.List.NonEmptyZipper where -import Control.Lens import Data.List.NonEmpty (NonEmpty (..)) import Data.Semigroup @@ -29,7 +27,14 @@ , _after :: ![a] } deriving (Show, Eq, Ord) -makeLenses ''NonEmptyZipper+before :: Functor f => ([a] -> f [a]) -> NonEmptyZipper a -> f (NonEmptyZipper a)+before f x = (\c' -> x { _before = c' }) <$> f (_before x)++current :: Functor f => (a -> f a) -> NonEmptyZipper a -> f (NonEmptyZipper a)+current f x = (\c' -> x { _current = c' }) <$> f (_current x)++after :: Functor f => ([a] -> f [a]) -> NonEmptyZipper a -> f (NonEmptyZipper a)+after f x = (\c' -> x { _after = c' }) <$> f (_after x) instance Functor NonEmptyZipper where fmap f (NonEmptyZipper xs y zs) =
non-empty-zipper.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: non-empty-zipper-version: 0.1.0.1+version: 0.1.0.2 synopsis: The Zipper for NonEmpty description: The Zipper for NonEmpty. Useful for things like tabs, button groups, and slideshows. Basically any case in which@@ -27,7 +27,6 @@ -- other-modules: -- other-extensions: build-depends: base >=4.9 && <4.10- , lens -- hs-source-dirs: default-language: Haskell2010 @@ -36,7 +35,6 @@ -- hs-source-dirs: test main-is: Spec.hs build-depends: base- , lens , non-empty-zipper , QuickCheck , checkers