lens 3.5 → 3.5.1
raw patch · 13 files changed
+46/−4 lines, 13 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.markdown +4/−0
- lens.cabal +1/−1
- src/Control/Lens.hs +3/−0
- src/Control/Lens/Internal/BazaarT.hs +4/−1
- src/Control/Lens/Unsafe.hs +2/−2
- src/Control/Parallel/Strategies/Lens.hs +4/−0
- src/Data/HashSet/Lens.hs +4/−0
- src/Data/Text/Lazy/Lens.hs +4/−0
- src/Data/Text/Lens.hs +4/−0
- src/Data/Text/Strict/Lens.hs +4/−0
- src/Data/Typeable/Lens.hs +4/−0
- src/Data/Vector/Generic/Lens.hs +4/−0
- src/Data/Vector/Lens.hs +4/−0
CHANGELOG.markdown view
@@ -1,3 +1,7 @@+3.5.1+-----+* Improved SafeHaskell inference.+ 3.5 --- * Fixed a potential SafeHaskell issue where a user could use `undefined` to derive `unsafeCoerce`. You now have to import an explicitly
lens.cabal view
@@ -1,6 +1,6 @@ name: lens category: Data, Lenses-version: 3.5+version: 3.5.1 license: BSD3 cabal-version: >= 1.8 license-file: LICENSE
src/Control/Lens.hs view
@@ -3,6 +3,9 @@ {-# LANGUAGE Rank2Types #-} {-# LANGUAGE LiberalTypeSynonyms #-} {-# LANGUAGE FlexibleContexts #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : Control.Lens
src/Control/Lens/Internal/BazaarT.hs view
@@ -51,11 +51,14 @@ BazaarT mf <*> BazaarT ma = BazaarT (\k -> mf k <*> ma k) {-# INLINE (<*>) #-} +-- | Extract from a 'BazaarT'.+--+-- @'bazaarT' = 'flip' 'runBazaarT'@ bazaarT :: Applicative f => (a -> f b) -> BazaarT a b g s -> f s bazaarT afb (BazaarT m) = m afb {-# INLINE bazaarT #-} --- | A trivial 'Bazaar'.+-- | A trivial 'BazaarT'. sellT :: a -> BazaarT a b f b sellT i = BazaarT (\k -> k i) {-# INLINE sellT #-}
src/Control/Lens/Unsafe.hs view
@@ -24,8 +24,8 @@ -- | This class is only exported by this untrustworthy module, but is a superclass of 'Gettable'. ----- This is required because otherwise you could construct 'unsafeCoerce' using 'EvilBazaar' and--- an illegal 'Gettable' instance that uses 'undefined'.+-- This is required because otherwise you could construct 'Unsafe.Coerce.unsafeCoerce' using 'Control.Lens.Internal.BazaarT.BazaarT' and+-- an illegal 'Control.Lens.Classes.Gettable' instance that uses @'Control.Lens.Classes.coerce' = 'undefined'@. class Trustworthy (f :: * -> *) instance Trustworthy (Const a)
src/Control/Parallel/Strategies/Lens.hs view
@@ -1,3 +1,7 @@+{-# LANGUAGE CPP #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : Control.Parallel.Strategies.Lens
src/Data/HashSet/Lens.hs view
@@ -1,4 +1,8 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : Data.HashSet.Lens
src/Data/Text/Lazy/Lens.hs view
@@ -1,5 +1,9 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : Data.Text.Lazy.Lens
src/Data/Text/Lens.hs view
@@ -1,4 +1,8 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : Data.Text.Lens
src/Data/Text/Strict/Lens.hs view
@@ -1,4 +1,8 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : Data.Text.Strict.Lens
src/Data/Typeable/Lens.hs view
@@ -1,4 +1,8 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Trustworthy #-}+#endif ----------------------------------------------------------------------------- -- | -- Module : Data.Typeable.Lens
src/Data/Vector/Generic/Lens.hs view
@@ -1,8 +1,12 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LiberalTypeSynonyms #-} {-# LANGUAGE MultiParamTypeClasses #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Trustworthy #-}+#endif ------------------------------------------------------------------------------- -- | -- Module : Data.Vector.Generic.Lens
src/Data/Vector/Lens.hs view
@@ -1,8 +1,12 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LiberalTypeSynonyms #-} {-# LANGUAGE MultiParamTypeClasses #-}+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704+{-# LANGUAGE Trustworthy #-}+#endif ------------------------------------------------------------------------------- -- | -- Module : Data.Vector.Lens