packages feed

lens 5.2 → 5.2.1

raw patch · 11 files changed

+66/−12 lines, 11 filesdep ~assocdep ~base-compatdep ~semigroupoids

Dependency ranges changed: assoc, base-compat, semigroupoids, strict, template-haskell, th-abstraction, these

Files

CHANGELOG.markdown view
@@ -1,3 +1,12 @@+5.2.1 [2023.02.27]+------------------+* Allow building with GHC 9.6.+* Allow building with GHC backends where `HTYPE_SIG_ATOMIC_T` is not defined,+  such as the WASM backend.+* Support building with `th-abstraction-0.5.*`.+* Define `_TypeDataD` in `Language.Haskell.TH.Lens` when building with+  `template-haskell-2.20.0.0` (GHC 9.6) or later.+ 5.2 [2022.08.11] ---------------- * Allow building with GHC 9.4.
examples/lens-examples.cabal view
@@ -23,7 +23,9 @@              , GHC == 8.8.4              , GHC == 8.10.7              , GHC == 9.0.2-             , GHC == 9.2.2+             , GHC == 9.2.6+             , GHC == 9.4.4+             , GHC == 9.6.1  source-repository head   type: git
lens-properties/lens-properties.cabal view
@@ -20,7 +20,9 @@              , GHC == 8.8.4              , GHC == 8.10.7              , GHC == 9.0.2-             , GHC == 9.2.2+             , GHC == 9.2.6+             , GHC == 9.4.4+             , GHC == 9.6.1  extra-source-files:   .hlint.yaml
lens.cabal view
@@ -1,6 +1,6 @@ name:          lens category:      Data, Lenses, Generics-version:       5.2+version:       5.2.1 license:       BSD2 cabal-version: 1.18 license-file:  LICENSE@@ -19,7 +19,9 @@              , GHC == 8.8.4              , GHC == 8.10.7              , GHC == 9.0.2-             , GHC == 9.2.2+             , GHC == 9.2.6+             , GHC == 9.4.4+             , GHC == 9.6.1 synopsis:      Lenses, Folds and Traversals description:   This package comes \"Batteries Included\" with many useful lenses for the types@@ -50,7 +52,7 @@   .   <<http://i.imgur.com/ALlbPRa.png>>   .-  <images/Hierarchy.png (Local Copy)>+  <https://raw.githubusercontent.com/ekmett/lens/master/images/Hierarchy.png (Local Copy)>   .   You can compose any two elements of the hierarchy above using @(.)@ from the @Prelude@, and you can   use any element of the hierarchy as any type it linked to above it.@@ -196,9 +198,9 @@     semigroupoids                 >= 5.0.1    && < 6,     strict                        >= 0.4      && < 0.5,     tagged                        >= 0.8.6    && < 1,-    template-haskell              >= 2.11.1.0 && < 2.20,+    template-haskell              >= 2.11.1.0 && < 2.21,     text                          >= 1.2.3.0  && < 2.1,-    th-abstraction                >= 0.4.1    && < 0.5,+    th-abstraction                >= 0.4.1    && < 0.6,     these                         >= 1.1.1.1  && < 1.2,     transformers                  >= 0.5.0.0  && < 0.7,     transformers-compat           >= 0.5.0.4  && < 1,
src/Control/Lens/Equality.hs view
@@ -3,9 +3,14 @@ {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-}-{-# LANGUAGE TypeInType #-} {-# LANGUAGE Trustworthy #-} +#if __GLASGOW_HASKELL__ >= 806+{-# LANGUAGE PolyKinds #-}+#else+{-# LANGUAGE TypeInType #-}+#endif+ ----------------------------------------------------------------------------- -- | -- Module      :  Control.Lens.Equality@@ -144,8 +149,6 @@ -- -- @fromLeibniz' :: (forall f. f s -> f a) -> Equality' s a@ fromLeibniz' :: (s :~: s -> s :~: a) -> Equality' s a--- Note: even though its type signature mentions (:~:), this function works just--- fine in base versions before 4.7.0; it just requires a polymorphic argument! fromLeibniz' f = case f Refl of Refl -> id {-# INLINE fromLeibniz' #-} 
src/Control/Lens/Internal/TH.hs view
@@ -154,6 +154,9 @@ isDataFamily D.Newtype         = False isDataFamily D.DataInstance    = True isDataFamily D.NewtypeInstance = True+#if MIN_VERSION_th_abstraction(0,5,0)+isDataFamily D.TypeData        = False+#endif  ------------------------------------------------------------------------ -- TH-quoted names
src/Control/Lens/Iso.hs view
@@ -5,7 +5,12 @@ {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE Trustworthy #-}++#if __GLASGOW_HASKELL__ >= 806+{-# LANGUAGE PolyKinds #-}+#else {-# LANGUAGE TypeInType #-}+#endif  #include "lens-common.h" 
src/Control/Lens/Lens.hs view
@@ -6,7 +6,12 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Trustworthy #-}++#if __GLASGOW_HASKELL__ >= 806+{-# LANGUAGE PolyKinds #-}+#else {-# LANGUAGE TypeInType #-}+#endif  #include "lens-common.h" 
src/Control/Lens/Type.hs view
@@ -5,8 +5,13 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-}-{-# LANGUAGE TypeInType #-} {-# LANGUAGE Trustworthy #-}++#if __GLASGOW_HASKELL__ >= 806+{-# LANGUAGE PolyKinds #-}+#else+{-# LANGUAGE TypeInType #-}+#endif ------------------------------------------------------------------------------- -- | -- Module      :  Control.Lens.Type
src/Control/Lens/Wrapped.hs view
@@ -1000,7 +1000,12 @@  instance Rewrapped CSigAtomic t instance Wrapped CSigAtomic where-  type Unwrapped CSigAtomic = HTYPE_SIG_ATOMIC_T+  type Unwrapped CSigAtomic =+#if defined(HTYPE_SIG_ATOMIC_T)+    HTYPE_SIG_ATOMIC_T+#else+    Int32+#endif   _Wrapped' = iso (\(CSigAtomic x) -> x) CSigAtomic   {-# INLINE _Wrapped' #-} 
src/Language/Haskell/TH/Lens.hs view
@@ -128,6 +128,9 @@ #if MIN_VERSION_template_haskell(2,19,0)   , _DefaultD #endif+#if MIN_VERSION_template_haskell(2,20,0)+  , _TypeDataD+#endif #if MIN_VERSION_template_haskell(2,12,0)   -- ** PatSynDir Prisms   , _Unidir@@ -1169,6 +1172,16 @@   where       reviewer = DefaultD       remitter (DefaultD x) = Just x+      remitter _ = Nothing+#endif++#if MIN_VERSION_template_haskell(2,20,0)+_TypeDataD :: Prism' Dec (Name, [TyVarBndr ()], Maybe Kind, [Con])+_TypeDataD+  = prism' reviewer remitter+  where+      reviewer (x, y, z, u) = TypeDataD x y z u+      remitter (TypeDataD x y z u) = Just (x, y, z, u)       remitter _ = Nothing #endif