packages feed

lens 4.1.1 → 4.1.2

raw patch · 6 files changed

+27/−12 lines, 6 filesdep ~template-haskell

Dependency ranges changed: template-haskell

Files

CHANGELOG.markdown view
@@ -1,3 +1,7 @@+4.1.2+-----+* When used with `exceptions` 0.4, `throwingM` will permit use with a mere `MonadThrow`.+ 4.1.1 ---- * Generalized the types of `mapping`, `bimapping`, `contramapping`, `dimapping`, `lmapping`, `rmapping` to support changing the `Functor`, `Bifunctor`, `Contravariant`, and `Profunctor` respectively.
lens.cabal view
@@ -1,6 +1,6 @@ name:          lens category:      Data, Lenses, Generics-version:       4.1.1+version:       4.1.2 license:       BSD3 cabal-version: >= 1.8 license-file:  LICENSE@@ -206,7 +206,7 @@     semigroups                >= 0.8.4    && < 1,     split                     >= 0.2      && < 0.3,     tagged                    >= 0.4.4    && < 1,-    template-haskell          >= 2.4      && < 2.10,+    template-haskell          >= 2.4      && < 2.11,     text                      >= 0.11     && < 1.2,     transformers              >= 0.2      && < 0.4,     transformers-compat       >= 0.1      && < 1,
src/Control/Exception/Lens.hs view
@@ -12,6 +12,13 @@ #define MIN_VERSION_base(x,y,z) 1 #endif +#ifndef MIN_VERSION_exceptions+#define MIN_VERSION_exceptions 1+#endif++#if !(MIN_VERSION_exceptions(0,4,0))+#define MonadThrow MonadCatch+#endif ----------------------------------------------------------------------------- -- | -- Module      :  Control.Exception.Lens@@ -293,10 +300,10 @@ -- @ -- -- @--- 'throwingM' :: 'MonadCatch' m => 'Prism'' 'SomeException' t -> t -> m r--- 'throwingM' :: 'MonadCatch' m => 'Iso'' 'SomeException' t   -> t -> m r+-- 'throwingM' :: 'MonadThrow' m => 'Prism'' 'SomeException' t -> t -> m r+-- 'throwingM' :: 'MonadThrow' m => 'Iso'' 'SomeException' t   -> t -> m r -- @-throwingM :: MonadCatch m => AReview s SomeException a b -> b -> m r+throwingM :: MonadThrow m => AReview s SomeException a b -> b -> m r throwingM l = reviews l throwM {-# INLINE throwingM #-} 
src/Control/Lens/Internal/TupleIxedTH.hs view
@@ -1,6 +1,10 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} +#ifndef MIN_VERSION_template_haskell+#define MIN_VERSION_template_haskell(x,y,z) 1+#endif+ ----------------------------------------------------------------------------- -- | -- Module      :  Control.Lens.Internal.TupleIxedTH@@ -63,7 +67,7 @@ tupleIxed n = instanceD (cxt eqs) (conT ixedN `appT` fullTupleT n) [funD ixN clauses]   where   ty0:tyN = take n tupleVarTypes-#if __GLASGOW_HASKELL__ >= 709+#if MIN_VERSION_template_haskell(2,10,0)   eqs     = [AppT . AppT EqualityT <$> ty0 <*> ty | ty <- tyN] #else   eqs     = [ty0 `equalP` ty | ty <- tyN]
src/Control/Lens/TH.hs view
@@ -1030,7 +1030,7 @@         ctx = dataContext dataDecl         ps = filter relevantCtx (substTypeVars m ctx)         qs = case maybeClassName of-#if __GLASGOW_HASKELL__ >= 709+#if MIN_VERSION_template_haskell(2,10,0)            Just n | not (cfg^.createClass) -> AppT (ConT n) (VarT t) : (ctx ++ ps) #else            Just n | not (cfg^.createClass) -> ClassP n [VarT t] : (ctx ++ ps)@@ -1166,7 +1166,7 @@        appliedType' = return (fullType dataDecl (map VarT typeArgs'))         -- Con a' b' c'... ~ t-#if __GLASGOW_HASKELL__ >= 709+#if MIN_VERSION_template_haskell(2,10,0)        eq = AppT. AppT EqualityT <$> appliedType' <*> t #else        eq = equalP appliedType' t
src/Language/Haskell/TH/Lens.hs view
@@ -249,7 +249,7 @@   , _NumTyLit   , _StrTyLit #endif-#if __GLASGOW_HASKELL__ < 709+#if !MIN_VERSION_template_haskell(2,10,0)   -- ** Pred Prisms   , _ClassP   , _EqualP@@ -324,7 +324,7 @@        where s' = s `Set.union` setOf typeVars bs   typeVarsEx _ _ t                   = pure t -#if __GLASGOW_HASKELL__ < 709+#if !MIN_VERSION_template_haskell(2,10,0) instance HasTypeVars Pred where   typeVarsEx s f (ClassP n ts) = ClassP n <$> typeVarsEx s f ts   typeVarsEx s f (EqualP l r)  = EqualP <$> typeVarsEx s f l <*> typeVarsEx s f r@@ -365,7 +365,7 @@ instance SubstType t => SubstType [t] where   substType = map . substType -#if __GLASGOW_HASKELL__ < 709+#if !MIN_VERSION_template_haskell(2,10,0) instance SubstType Pred where   substType m (ClassP n ts) = ClassP n (substType m ts)   substType m (EqualP l r)  = substType m (EqualP l r)@@ -1759,7 +1759,7 @@       reviewer x = Left x #endif -#if __GLASGOW_HASKELL__ < 709+#if !MIN_VERSION_template_haskell(2,10,0) _ClassP :: Prism' Pred (Name, [Type]) _ClassP   = prism remitter reviewer