packages feed

fclabels 2.0.2 → 2.0.2.1

raw patch · 4 files changed

+49/−13 lines, 4 filesdep ~template-haskellPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: template-haskell

API changes (from Hackage documentation)

Files

CHANGELOG view
@@ -1,16 +1,20 @@ CHANGELOG +2.0.2 to 2.0.2.1++  - Support for GHC 7.10 by widening TH dependencies.+ 2.0.2- - Add `for` as a synonym for `>-` to avoid a clash with the Arrows extension.+  - Add `for` as a synonym for `>-` to avoid a clash with the Arrows extension.  2.0.1.1 - - Allow mtl 2.2.* and transformers 0.4.*- - Allow template-haskell 2.9.* in test-suite+  - Allow mtl 2.2.* and transformers 0.4.*+  - Allow template-haskell 2.9.* in test-suite  2.0.0.5 to 2.0.1 - - Widened TH dependencies.+  - Widened TH dependencies.  2.0.0.4 -> 2.0.0.5   - Add Bug-Reports url again.
fclabels.cabal view
@@ -1,5 +1,5 @@ Name:          fclabels-Version:       2.0.2+Version:       2.0.2.1 Author:        Sebastiaan Visser, Erik Hesselink, Chris Eidhof, Sjoerd Visscher                with lots of help and feedback from others. Synopsis:      First class accessor labels implemented as lenses.@@ -47,9 +47,9 @@                See "Data.Label.Base" and "Data.Label.Monadic" for more                information.                .-               * /Changelog from 2.0.1.1 to 2.0.2/+               * /Changelog from 2.0.2 to 2.0.2.1/                .-               >   - Add `for` as a synonym for `>-` to avoid a clash with the Arrows extension.+               >   - Support for GHC 7.10 by widening TH dependencies.  Maintainer:         Sebastiaan Visser <code@fvisser.nl> Homepage:           https://github.com/sebastiaanvisser/fclabels@@ -79,7 +79,7 @@   GHC-Options: -Wall   Build-Depends:       base                       < 5-    , template-haskell >= 2.2 && < 2.10+    , template-haskell >= 2.2 && < 2.11     , mtl              >= 1.0 && < 2.3     , transformers     >= 0.2 && < 0.5 
src/Data/Label/Derive.hs view
@@ -44,16 +44,24 @@ import Control.Category import Control.Monad import Data.Char (toLower, toUpper)+#if MIN_VERSION_base(4,8,0)+import Data.Foldable (toList)+#else import Data.Foldable (Foldable, toList)+#endif import Data.Label.Point import Data.List (groupBy, sortBy, delete, nub) import Data.Maybe (fromMaybe) import Data.Ord+#if MIN_VERSION_template_haskell(2,10,0)+import Language.Haskell.TH hiding (classP)+#else import Language.Haskell.TH+#endif import Prelude hiding ((.), id) -import qualified Data.Label.Mono as Mono-import qualified Data.Label.Poly as Poly+import qualified Data.Label.Mono     as Mono+import qualified Data.Label.Poly     as Poly  ------------------------------------------------------------------------------- -- Publicly exposed functions.@@ -311,7 +319,11 @@                     mono  = any (\x -> any (elem x) fsTys) (typeVariables ty)      ForallC x y v -> setEqs <$> constructorFields v+#if MIN_VERSION_template_haskell(2,10,0)+      where eqs = [ (a, b) | AppT (AppT EqualityT a) b <- y ]+#else       where eqs = [ (a, b) | EqualP a b <- y ]+#endif             setEqs (Field a b c d) = Field a b c (first upd . second (eqs ++) $ d)             upd (Context a b c) = Context a b (ForallC x y c) @@ -329,7 +341,11 @@             NormalC {}    -> []             RecC    {}    -> []             InfixC  {}    -> []+#if MIN_VERSION_template_haskell(2,10,0)+            ForallC _ x _ -> [ c | AppT (AppT EqualityT _) c <- x ]+#else             ForallC _ x _ -> [ c | EqualP _ c <- x ]+#endif  unifiable :: Type -> Type -> Bool unifiable x y =@@ -521,8 +537,9 @@ typeVariables = map nameFromBinder . binderFromType  typeFromBinder :: TyVarBndr -> Type-typeFromBinder (PlainTV  tv     ) = VarT tv-typeFromBinder (KindedTV tv kind) = SigT (VarT tv) kind+typeFromBinder (PlainTV  tv      ) = VarT tv+typeFromBinder (KindedTV tv StarT) = VarT tv+typeFromBinder (KindedTV tv kind ) = SigT (VarT tv) kind  binderFromType :: Type -> [TyVarBndr] binderFromType = go@@ -568,8 +585,12 @@ nameFromBinder (KindedTV n _) = n  mapPred :: (Name -> Name) -> Pred -> Pred+#if MIN_VERSION_template_haskell(2,10,0)+mapPred = mapTypeVariables+#else mapPred f (ClassP n ts) = ClassP (f n) (mapTypeVariables f <$> ts) mapPred f (EqualP t x ) = EqualP (mapTypeVariables f t) (mapTypeVariables f x)+#endif  mapTyVarBndr :: (Name -> Name) -> TyVarBndr -> TyVarBndr mapTyVarBndr f (PlainTV  n  ) = PlainTV (f n)@@ -598,4 +619,12 @@  fclError :: String -> a fclError err = error ("Data.Label.Derive: " ++ err)++#if MIN_VERSION_template_haskell(2,10,0)+classP :: Name -> [Q Type] -> Q Pred+classP cla tys+  = do tysl <- sequence tys+       return (foldl AppT (ConT cla) tysl)+#endif+ 
src/Data/Label/Total.hs view
@@ -4,7 +4,7 @@ multi constructor datatypes. -} -{-# LANGUAGE TypeOperators #-}+{-# LANGUAGE CPP, TypeOperators #-}  module Data.Label.Total ( (:->)@@ -20,6 +20,9 @@ ) where +#if MIN_VERSION_base(4,8,0)+import Prelude hiding (traverse)+#endif import Control.Monad ((<=<), liftM) import Data.Label.Poly (Lens) import Data.Label.Point (Total)