packages feed

lens 4.16.1 → 4.17

raw patch · 21 files changed

+146/−71 lines, 21 filesdep ~containersdep ~profunctorsdep ~template-haskell

Dependency ranges changed: containers, profunctors, template-haskell

Files

.travis.yml view
@@ -1,6 +1,6 @@ # This Travis job script has been generated by a script via #-#   runghc make_travis_yml_2.hs '-o' '.travis.yml' '--irc-channel=irc.freenode.org#haskell-lens' '--no-no-tests-no-bench' '--no-installed' 'cabal.project'+#   runghc make_travis_yml_2.hs '-o' '.travis.yml' '--ghc-head' '--irc-channel=irc.freenode.org#haskell-lens' '--no-no-tests-no-bench' '--no-unconstrained' 'cabal.project' # # For more information, see https://github.com/hvr/multi-ghc-travis #@@ -44,33 +44,37 @@  matrix:   include:-    - compiler: "ghc-7.4.2"+    - compiler: "ghc-8.6.1"+      env: GHCHEAD=true+      addons: {apt: {packages: [*apt_packages,cabal-install-head,ghc-8.6.1], sources: [hvr-ghc]}}+    - compiler: "ghc-8.4.3"     # env: TEST=--disable-tests BENCH=--disable-benchmarks-      addons: {apt: {packages: [*apt_packages,cabal-install-2.0,ghc-7.4.2], sources: [hvr-ghc]}}-    - compiler: "ghc-7.6.3"+      addons: {apt: {packages: [*apt_packages,cabal-install-2.2,ghc-8.4.3], sources: [hvr-ghc]}}+    - compiler: "ghc-8.2.2"     # env: TEST=--disable-tests BENCH=--disable-benchmarks-      addons: {apt: {packages: [*apt_packages,cabal-install-2.0,ghc-7.6.3], sources: [hvr-ghc]}}-    - compiler: "ghc-7.8.4"+      addons: {apt: {packages: [*apt_packages,cabal-install-2.2,ghc-8.2.2], sources: [hvr-ghc]}}+    - compiler: "ghc-8.0.2"     # env: TEST=--disable-tests BENCH=--disable-benchmarks-      addons: {apt: {packages: [*apt_packages,cabal-install-2.0,ghc-7.8.4], sources: [hvr-ghc]}}+      addons: {apt: {packages: [*apt_packages,cabal-install-2.2,ghc-8.0.2], sources: [hvr-ghc]}}     - compiler: "ghc-7.10.3"     # env: TEST=--disable-tests BENCH=--disable-benchmarks-      addons: {apt: {packages: [*apt_packages,cabal-install-2.0,ghc-7.10.3], sources: [hvr-ghc]}}-    - compiler: "ghc-8.0.2"+      addons: {apt: {packages: [*apt_packages,cabal-install-2.2,ghc-7.10.3], sources: [hvr-ghc]}}+    - compiler: "ghc-7.8.4"     # env: TEST=--disable-tests BENCH=--disable-benchmarks-      addons: {apt: {packages: [*apt_packages,cabal-install-2.0,ghc-8.0.2], sources: [hvr-ghc]}}-    - compiler: "ghc-8.2.2"+      addons: {apt: {packages: [*apt_packages,cabal-install-2.2,ghc-7.8.4], sources: [hvr-ghc]}}+    - compiler: "ghc-7.6.3"     # env: TEST=--disable-tests BENCH=--disable-benchmarks-      addons: {apt: {packages: [*apt_packages,cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}-    - compiler: "ghc-8.4.1"+      addons: {apt: {packages: [*apt_packages,cabal-install-2.2,ghc-7.6.3], sources: [hvr-ghc]}}+    - compiler: "ghc-7.4.2"     # env: TEST=--disable-tests BENCH=--disable-benchmarks-      addons: {apt: {packages: [*apt_packages,cabal-install-2.2,ghc-8.4.1], sources: [hvr-ghc]}}+      addons: {apt: {packages: [*apt_packages,cabal-install-2.2,ghc-7.4.2], sources: [hvr-ghc]}}     - compiler: "ghc-head"       env: GHCHEAD=true       addons: {apt: {packages: [*apt_packages,cabal-install-head,ghc-head], sources: [hvr-ghc]}}    allow_failures:     - compiler: "ghc-head"+    - compiler: "ghc-8.6.1"  before_install:   - HC=${CC}@@ -93,7 +97,8 @@   - BENCH=${BENCH---enable-benchmarks}   - TEST=${TEST---enable-tests}   - HADDOCK=${HADDOCK-true}-  - INSTALLED=${INSTALLED-true}+  - UNCONSTRAINED=${UNCONSTRAINED-true}+  - NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}   - GHCHEAD=${GHCHEAD-false}   - travis_retry cabal update -v   - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"@@ -101,7 +106,8 @@   # Overlay Hackage Package Index for GHC HEAD: https://github.com/hvr/head.hackage   - |     if $GHCHEAD; then-      sed -i.bak 's/-- allow-newer:.*/allow-newer: *:base, *:template-haskell, *:ghc, *:Cabal/' ${HOME}/.cabal/config+      sed -i 's/-- allow-newer: .*/allow-newer: *:base/' ${HOME}/.cabal/config+      for pkg in $($HCPKG list --simple-output); do pkg=$(echo $pkg | sed 's/-[^-]*$//'); sed -i "s/allow-newer: /allow-newer: *:$pkg, /" ${HOME}/.cabal/config; done        echo 'repository head.hackage'                                                        >> ${HOME}/.cabal/config       echo '   url: http://head.hackage.haskell.org/'                                       >> ${HOME}/.cabal/config@@ -111,11 +117,16 @@       echo '              8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e' >> ${HOME}/.cabal/config       echo '   key-threshold: 3'                                                            >> ${HOME}/.cabal.config +      grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'+       cabal new-update head.hackage -v     fi   - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'   - "printf 'packages: \".\" \"./examples\" \"./lens-properties\"\\n' > cabal.project"-  - cat cabal.project+  - touch cabal.project.local+  - "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"+  - cat cabal.project || true+  - cat cabal.project.local || true   - if [ -f "./configure.ac" ]; then       (cd "." && autoreconf -i);     fi@@ -127,7 +138,7 @@     fi   - rm -f cabal.project.freeze   - cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all-  - rm -rf "."/.ghc.environment.* "./examples"/.ghc.environment.* "./lens-properties"/.ghc.environment.* "."/dist "./examples"/dist "./lens-properties"/dist+  - rm -rf .ghc.environment.* "."/dist "./examples"/dist "./lens-properties"/dist   - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)  # Here starts the actual work to be performed for the package under test;@@ -141,8 +152,10 @@   - cd ${DISTDIR} || false   - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;   - "printf 'packages: lens-*/*.cabal lens-examples-*/*.cabal lens-properties-*/*.cabal\\n' > cabal.project"-  - cat cabal.project-+  - touch cabal.project.local+  - "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"+  - cat cabal.project || true+  - cat cabal.project.local || true    # build & run tests, build benchmarks   - cabal new-build -w ${HC} ${TEST} ${BENCH} all@@ -160,5 +173,5 @@   # hlint   - (cd lens-* && hlint src --cpp-define=HLINT --cpp-ansi) -# REGENDATA ["-o",".travis.yml","--irc-channel=irc.freenode.org#haskell-lens","--no-no-tests-no-bench","--no-installed","cabal.project"]+# REGENDATA ["-o",".travis.yml","--ghc-head","--irc-channel=irc.freenode.org#haskell-lens","--no-no-tests-no-bench","--no-unconstrained","cabal.project"] # EOF
CHANGELOG.markdown view
@@ -1,5 +1,16 @@-4.6.1 [2018.03.23]-------------------+4.17 [2018.07.03]+-----------------+* Allow building with GHC 8.6.+* Make the instances for `Product` and `(:*:)` in `Control.Lens.Tuple`+  poly-kinded.+* Make the definitions in `GHC.Generics.Lens` poly-kinded.+* Make `(%%@~)`, `(%%@=)`, `(<%@=)`, and `(<<%@=)` consume an+  `Over (Indexed i)` instead of an `IndexedLensLike i` to improve type+  inference.+* Add an `AsEmpty` instance for `ZipList`.++4.16.1 [2018.03.23]+------------------- * Re-export `(<&>)` from `Data.Functor` on `base-4.11` and later. * Added `Cons` and `Snoc` instances for `Control.Applicative.ZipList` * Fix a bug in which `makeFields` would generate equality constraints for
examples/lens-examples.cabal view
@@ -16,7 +16,14 @@                Pong Example  build-type:    Simple-tested-with:   GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1+tested-with:   GHC == 7.4.2+             , GHC == 7.6.3+             , GHC == 7.8.4+             , GHC == 7.10.3+             , GHC == 8.0.2+             , GHC == 8.2.2+             , GHC == 8.4.3+             , GHC == 8.6.1  source-repository head   type: git
lens.cabal view
@@ -1,6 +1,6 @@ name:          lens category:      Data, Lenses, Generics-version:       4.16.1+version:       4.17 license:       BSD2 cabal-version: >= 1.8 license-file:  LICENSE@@ -12,7 +12,14 @@ copyright:     Copyright (C) 2012-2016 Edward A. Kmett build-type:    Custom -- build-tools:   cpphs-tested-with:   GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1+tested-with:   GHC == 7.4.2+             , GHC == 7.6.3+             , GHC == 7.8.4+             , GHC == 7.10.3+             , GHC == 8.0.2+             , GHC == 8.2.2+             , GHC == 8.4.3+             , GHC == 8.6.1 synopsis:      Lenses, Folds and Traversals description:   This package comes \"Batteries Included\" with many useful lenses for the types@@ -115,7 +122,7 @@  custom-setup   setup-depends:-    Cabal >= 1.10 && <2.3,+    Cabal >= 1.10 && <2.5,     base  >= 4.5 && <5,     cabal-doctest >= 1 && <1.1,     filepath@@ -192,7 +199,7 @@     call-stack                >= 0.1      && < 0.2,     comonad                   >= 4        && < 6,     contravariant             >= 1.3      && < 2,-    containers                >= 0.4.0    && < 0.6,+    containers                >= 0.4.0    && < 0.7,     distributive              >= 0.3      && < 1,     filepath                  >= 1.2.0.0  && < 1.5,     free                      >= 4        && < 6,@@ -207,7 +214,7 @@     semigroupoids             >= 5        && < 6,     semigroups                >= 0.8.4    && < 1,     tagged                    >= 0.4.4    && < 1,-    template-haskell          >= 2.4      && < 2.14,+    template-haskell          >= 2.4      && < 2.15,     th-abstraction            >= 0.2.1    && < 0.3,     text                      >= 0.11     && < 1.3,     transformers              >= 0.2      && < 0.6,@@ -416,7 +423,7 @@       containers,       directory      >= 1.0,       deepseq,-      doctest        >= 0.11.4 && < 0.12 || >= 0.13 && < 0.16,+      doctest        >= 0.11.4 && < 0.12 || >= 0.13 && < 0.17,       filepath,       generic-deriving,       lens,
src/Control/Lens/Empty.hs view
@@ -33,6 +33,7 @@ #if __GLASGOW_HASKELL__ >= 710 import Control.Lens.Fold #endif+import Control.Applicative (ZipList(..)) import Control.Lens.Prism import Control.Lens.Review import Data.ByteString as StrictB@@ -119,6 +120,10 @@  instance AsEmpty [a] where   _Empty = nearly [] Prelude.null+  {-# INLINE _Empty #-}++instance AsEmpty (ZipList a) where+  _Empty = nearly (ZipList []) (Prelude.null . getZipList)   {-# INLINE _Empty #-}  instance AsEmpty (Map k a) where
src/Control/Lens/Fold.hs view
@@ -9,8 +9,9 @@ #define MIN_VERSION_reflection(x,y,z) 1 #endif -#if __GLASGOW_HASKELL__ < 708 {-# LANGUAGE Trustworthy #-}+#if __GLASGOW_HASKELL__ >= 800+{-# OPTIONS_GHC -Wno-trustworthy-safe #-} #endif  {-# OPTIONS_GHC -fno-warn-orphans #-}
src/Control/Lens/Getter.hs view
@@ -2,10 +2,7 @@ {-# LANGUAGE Rank2Types #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-}--#if __GLASGOW_HASKELL__ < 708 {-# LANGUAGE Trustworthy #-}-#endif  #if __GLASGOW_HASKELL__ && __GLASGOW_HASKELL__ >= 704 {-# LANGUAGE NoPolyKinds #-}@@ -17,6 +14,10 @@ -- users would get warnings when annotating types at uses of these functions. #if __GLASGOW_HASKELL__ >= 711 {-# OPTIONS_GHC -fno-warn-redundant-constraints #-}+#endif++#if __GLASGOW_HASKELL__ >= 800+{-# OPTIONS_GHC -Wno-trustworthy-safe #-} #endif ------------------------------------------------------------------------------- -- |
src/Control/Lens/Internal/Coerce.hs view
@@ -17,13 +17,17 @@ -- Portability :  non-portable -- -- This module provides a shim around 'coerce' that defaults to 'unsafeCoerce'--- on GHC < 7.8+-- on GHC < 7.8. It also exposes a type-restricted version of '(#.)' that+-- works around a bizarre GHC 7.10–specific bug. ----------------------------------------------------------------------------- module Control.Lens.Internal.Coerce   ( coerce   , coerce'+  , (#..)   ) where +import Data.Profunctor.Unsafe+ #ifdef USE_COERCE  import Data.Coerce@@ -32,6 +36,10 @@ coerce' = coerce (id :: a -> a) {-# INLINE coerce' #-} +(#..) :: (Profunctor p, Coercible c b) => (b -> c) -> p a b -> p a c+(#..) = (#.)+{-# INLINE (#..) #-}+ #else  import Unsafe.Coerce@@ -41,4 +49,8 @@ coerce' = unsafeCoerce {-# INLINE coerce #-} {-# INLINE coerce' #-}++(#..) :: Profunctor p => (b -> c) -> p a b -> p a c+(#..) = (#.)+{-# INLINE (#..) #-} #endif
src/Control/Lens/Internal/PrismTH.hs view
@@ -1,10 +1,10 @@ {-# LANGUAGE CPP #-} #ifdef TRUSTWORTHY-# if MIN_VERSION_template_haskell(2,12,0)-{-# LANGUAGE Safe #-}-# else {-# LANGUAGE Trustworthy #-}-# endif+#endif++#if __GLASGOW_HASKELL__ >= 800+{-# OPTIONS_GHC -Wno-trustworthy-safe #-} #endif  #ifndef MIN_VERSION_template_haskell
src/Control/Lens/Internal/Zoom.hs view
@@ -2,9 +2,10 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-}--#if __GLASGOW_HASKELL__ < 708 {-# LANGUAGE Trustworthy #-}++#if __GLASGOW_HASKELL__ >= 800+{-# OPTIONS_GHC -Wno-trustworthy-safe #-} #endif  {-# OPTIONS_GHC -fno-warn-orphans -fno-warn-warnings-deprecations #-}
src/Control/Lens/Lens.hs view
@@ -5,14 +5,16 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE Trustworthy #-}  #ifndef MIN_VERSION_mtl #define MIN_VERSION_mtl(x,y,z) 1 #endif -#if __GLASGOW_HASKELL__ < 708-{-# LANGUAGE Trustworthy #-}+#if __GLASGOW_HASKELL__ >= 800+{-# OPTIONS_GHC -Wno-trustworthy-safe #-} #endif+ ------------------------------------------------------------------------------- -- | -- Module      :  Control.Lens.Lens@@ -484,7 +486,7 @@ -- -- @ -- 'alongside' :: 'Lens'   s t a b -> 'Lens'   s' t' a' b' -> 'Lens'   (s,s') (t,t') (a,a') (b,b')--- 'alongside' :: 'Getter' s t a b -> 'Getter' s' t' a' b' -> 'Getter' (s,s') (t,t') (a,a') (b,b')+-- 'alongside' :: 'Getter' s   a   -> 'Getter' s'    a'    -> 'Getter' (s,s')        (a,a') -- @ alongside :: LensLike (AlongsideLeft f b') s  t  a  b           -> LensLike (AlongsideRight f t) s' t' a' b'@@ -1316,7 +1318,7 @@ -- ('%%@~') ::             'IndexedLens' i s t a b      -> (i -> a -> (r, b)) -> s -> (r, t) -- ('%%@~') :: 'Monoid' r => 'Control.Lens.Traversal.IndexedTraversal' i s t a b -> (i -> a -> (r, b)) -> s -> (r, t) -- @-(%%@~) :: IndexedLensLike i f s t a b -> (i -> a -> f b) -> s -> f t+(%%@~) :: Over (Indexed i) f s t a b -> (i -> a -> f b) -> s -> f t (%%@~) l = l .# Indexed {-# INLINE (%%@~) #-} @@ -1332,7 +1334,7 @@ -- ('%%@=') :: 'MonadState' s m                 => 'IndexedLens' i s s a b      -> (i -> a -> (r, b)) -> s -> m r -- ('%%@=') :: ('MonadState' s m, 'Monoid' r) => 'Control.Lens.Traversal.IndexedTraversal' i s s a b -> (i -> a -> (r, b)) -> s -> m r -- @-(%%@=) :: MonadState s m => IndexedLensLike i ((,) r) s s a b -> (i -> a -> (r, b)) -> m r+(%%@=) :: MonadState s m => Over (Indexed i) ((,) r) s s a b -> (i -> a -> (r, b)) -> m r #if MIN_VERSION_mtl(2,1,0) l %%@= f = State.state (l %%@~ f) #else@@ -1351,7 +1353,7 @@ -- ('<%@=') :: 'MonadState' s m                 => 'IndexedLens' i s s a b      -> (i -> a -> b) -> m b -- ('<%@=') :: ('MonadState' s m, 'Monoid' b) => 'Control.Lens.Traversal.IndexedTraversal' i s s a b -> (i -> a -> b) -> m b -- @-(<%@=) :: MonadState s m => IndexedLensLike i ((,) b) s s a b -> (i -> a -> b) -> m b+(<%@=) :: MonadState s m => Over (Indexed i) ((,) b) s s a b -> (i -> a -> b) -> m b l <%@= f = l %%@= \ i a -> let b = f i a in (b, b) {-# INLINE (<%@=) #-} @@ -1363,7 +1365,7 @@ -- ('<<%@=') :: 'MonadState' s m                 => 'IndexedLens' i s s a b      -> (i -> a -> b) -> m a -- ('<<%@=') :: ('MonadState' s m, 'Monoid' b) => 'Control.Lens.Traversal.IndexedTraversal' i s s a b -> (i -> a -> b) -> m a -- @-(<<%@=) :: MonadState s m => IndexedLensLike i ((,) a) s s a b -> (i -> a -> b) -> m a+(<<%@=) :: MonadState s m => Over (Indexed i) ((,) a) s s a b -> (i -> a -> b) -> m a #if MIN_VERSION_mtl(2,1,0) l <<%@= f = State.state (l (Indexed $ \ i a -> (a, f i a))) #else
src/Control/Lens/Plated.hs view
@@ -14,11 +14,11 @@ #endif  #ifdef TRUSTWORTHY-# if MIN_VERSION_template_haskell(2,12,0)-{-# LANGUAGE Safe #-}-# else {-# LANGUAGE Trustworthy #-} -- template-haskell-# endif+#endif++#if __GLASGOW_HASKELL__ >= 800+{-# OPTIONS_GHC -Wno-trustworthy-safe #-} #endif  #ifndef MIN_VERSION_template_haskell
src/Control/Lens/Review.hs view
@@ -1,12 +1,9 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-}--#if __GLASGOW_HASKELL__ < 708 {-# LANGUAGE Trustworthy #-}-#endif  #if __GLASGOW_HASKELL__ >= 800-{-# OPTIONS_GHC -Wno-redundant-constraints #-}+{-# OPTIONS_GHC -Wno-redundant-constraints -Wno-trustworthy-safe #-} #endif ------------------------------------------------------------------------------- -- |
src/Control/Lens/Setter.hs view
@@ -3,9 +3,10 @@ {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-}--#if __GLASGOW_HASKELL__ < 708 {-# LANGUAGE Trustworthy #-}++#if __GLASGOW_HASKELL__ >= 800+{-# OPTIONS_GHC -Wno-trustworthy-safe #-} #endif ----------------------------------------------------------------------------- -- |
src/Control/Lens/Traversal.hs view
@@ -1315,7 +1315,7 @@ deepOf :: (Conjoined p, Applicative f) => LensLike f s t s t -> Traversing p f s t a b -> Over p f s t a b deepOf r l = failing l (r . deepOf r l) --- | "Fuse" a 'Traversal' by reassociating all of the '<*>' operations to the+-- | "Fuse" a 'Traversal' by reassociating all of the @('<*>')@ operations to the -- left and fusing all of the 'fmap' calls into one. This is particularly -- useful when constructing a 'Traversal' using operations from "GHC.Generics". --@@ -1329,7 +1329,7 @@ -- -- 'confusing' exploits the 'Yoneda' lemma to merge their separate uses of 'fmap' into a single 'fmap'. -- and it further exploits an interesting property of the right Kan lift (or 'Curried') to left associate--- all of the uses of '(<*>)' to make it possible to fuse together more fmaps.+-- all of the uses of @('<*>')@ to make it possible to fuse together more fmaps. -- -- This is particularly effective when the choice of functor 'f' is unknown at compile -- time or when the 'Traversal' @foo.bar@ in the above description is recursive or complex
src/Control/Lens/Tuple.hs view
@@ -11,6 +11,9 @@ {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-}+#if __GLASGOW_HASKELL__ >= 706+{-# LANGUAGE PolyKinds #-}+#endif  #ifndef MIN_VERSION_base #define MIN_VERSION_base(x,y,z) 1
src/Control/Lens/Type.hs view
@@ -12,6 +12,10 @@ #if __GLASGOW_HASKELL__ >= 800 {-# LANGUAGE TypeInType #-} #endif+{-# LANGUAGE Trustworthy #-}+#if __GLASGOW_HASKELL__ >= 800+{-# OPTIONS_GHC -Wno-trustworthy-safe #-}+#endif ------------------------------------------------------------------------------- -- | -- Module      :  Control.Lens.Type@@ -458,7 +462,7 @@ -- -- Note: Composition with an 'Equality' is index-preserving. #if __GLASGOW_HASKELL__ >= 800-type Equality (s :: k1) (t :: k2) (a :: k1) (b :: k2) = forall k3 (p :: k1 -> k3 -> *) (f :: k2 -> k3) .+type Equality (s :: k1) (t :: k2) (a :: k1) (b :: k2) = forall k3 (p :: k1 -> k3 -> Type) (f :: k2 -> k3) . #elif __GLASGOW_HASKELL__ >= 706 type Equality (s :: k1) (t :: k2) (a :: k1) (b :: k2) = forall (p :: k1 -> * -> *) (f :: k2 -> *) . #else
src/Control/Lens/Zoom.hs view
@@ -32,6 +32,7 @@   ) where  import Control.Lens.Getter+import Control.Lens.Internal.Coerce import Control.Lens.Internal.Zoom import Control.Lens.Type import Control.Monad@@ -173,11 +174,11 @@   {-# INLINE zoom #-}  instance (Monoid w, Zoom m n s t) => Zoom (Strict.WriterT w m) (Strict.WriterT w n) s t where-  zoom l = Strict.WriterT . zoom (\afb -> unfocusingPlus #. l (FocusingPlus #. afb)) . Strict.runWriterT+  zoom l = Strict.WriterT . zoom (\afb -> unfocusingPlus #.. l (FocusingPlus #.. afb)) . Strict.runWriterT   {-# INLINE zoom #-}  instance (Monoid w, Zoom m n s t) => Zoom (Lazy.WriterT w m) (Lazy.WriterT w n) s t where-  zoom l = Lazy.WriterT . zoom (\afb -> unfocusingPlus #. l (FocusingPlus #. afb)) . Lazy.runWriterT+  zoom l = Lazy.WriterT . zoom (\afb -> unfocusingPlus #.. l (FocusingPlus #.. afb)) . Lazy.runWriterT   {-# INLINE zoom #-}  instance Zoom m n s t => Zoom (ListT m) (ListT n) s t where@@ -185,19 +186,19 @@   {-# INLINE zoom #-}  instance Zoom m n s t => Zoom (MaybeT m) (MaybeT n) s t where-  zoom l = MaybeT . liftM getMay . zoom (\afb -> unfocusingMay #. l (FocusingMay #. afb)) . liftM May . runMaybeT+  zoom l = MaybeT . liftM getMay . zoom (\afb -> unfocusingMay #.. l (FocusingMay #.. afb)) . liftM May . runMaybeT   {-# INLINE zoom #-}  instance (Error e, Zoom m n s t) => Zoom (ErrorT e m) (ErrorT e n) s t where-  zoom l = ErrorT . liftM getErr . zoom (\afb -> unfocusingErr #. l (FocusingErr #. afb)) . liftM Err . runErrorT+  zoom l = ErrorT . liftM getErr . zoom (\afb -> unfocusingErr #.. l (FocusingErr #.. afb)) . liftM Err . runErrorT   {-# INLINE zoom #-}  instance Zoom m n s t => Zoom (ExceptT e m) (ExceptT e n) s t where-  zoom l = ExceptT . liftM getErr . zoom (\afb -> unfocusingErr #. l (FocusingErr #. afb)) . liftM Err . runExceptT+  zoom l = ExceptT . liftM getErr . zoom (\afb -> unfocusingErr #.. l (FocusingErr #.. afb)) . liftM Err . runExceptT   {-# INLINE zoom #-}  instance (Functor f, Zoom m n s t) => Zoom (FreeT f m) (FreeT f n) s t where-  zoom l = FreeT . liftM (fmap $ zoom l) . liftM getFreed . zoom (\afb -> unfocusingFree #. l (FocusingFree #. afb)) . liftM Freed . runFreeT+  zoom l = FreeT . liftM (fmap $ zoom l) . liftM getFreed . zoom (\afb -> unfocusingFree #.. l (FocusingFree #.. afb)) . liftM Freed . runFreeT  ------------------------------------------------------------------------------ -- Magnify
src/Data/Set/Lens.hs view
@@ -4,6 +4,12 @@ #ifndef MIN_VERSION_containers #define MIN_VERSION_containers(x,y,z) 1 #endif++{-# LANGUAGE Trustworthy #-}+#if __GLASGOW_HASKELL__ >= 800+{-# OPTIONS_GHC -Wno-trustworthy-safe #-}+#endif+ ----------------------------------------------------------------------------- -- | -- Module      :  Data.Set.Lens
src/GHC/Generics/Lens.hs view
@@ -4,6 +4,9 @@ {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-}+#if __GLASGOW_HASKELL__ >= 706+{-# LANGUAGE PolyKinds #-}+#endif ----------------------------------------------------------------------------- -- | -- Module      :  GHC.Generics.Lens
src/Language/Haskell/TH/Lens.hs view
@@ -1,12 +1,12 @@ {-# LANGUAGE CPP #-} #if defined(__GLASGOW_HASKELL__)-# if MIN_VERSION_template_haskell(2,12,0)-{-# LANGUAGE Safe #-}-# else {-# LANGUAGE Trustworthy #-}-# endif #endif {-# LANGUAGE Rank2Types #-}++#if __GLASGOW_HASKELL__ >= 800+{-# OPTIONS_GHC -Wno-trustworthy-safe #-}+#endif  #ifndef MIN_VERSION_template_haskell #define MIN_VERSION_template_haskell(x,y,z) 1