packages feed

functor-combinators 0.4.1.0 → 0.4.1.1

raw patch · 9 files changed

+45/−14 lines, 9 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.Functor.Combinator: type family FreeFunctorBy t :: (Type -> Type) -> Constraint;
- Data.Functor.Invariant.Inplicative: instance (Data.Hashable.Class.Hashable k, GHC.Classes.Eq k) => Data.Functor.Invariant.Inplicative.Inply (Data.HashMap.Internal.HashMap k)
- Data.Functor.Invariant.Inplicative: instance Data.Functor.Invariant.Inplicative.Inplicative Data.Semigroup.Option
- Data.Functor.Invariant.Inplicative: instance Data.Functor.Invariant.Inplicative.Inply Data.Semigroup.Option
- Data.Functor.Invariant.Internative: instance (Data.Hashable.Class.Hashable k, GHC.Classes.Eq k) => Data.Functor.Invariant.Internative.Inalt (Data.HashMap.Internal.HashMap k)
- Data.Functor.Invariant.Internative: instance Data.Functor.Invariant.Internative.Inalt Data.Semigroup.Option
- Data.Functor.Invariant.Internative: instance Data.Functor.Invariant.Internative.Inplus Data.Semigroup.Option
- Data.Functor.Invariant.Internative: instance Data.Functor.Invariant.Internative.Internative Data.Semigroup.Option
- Data.HBifunctor: instance forall k1 k2 (f :: k1 -> *). Data.HFunctor.HTraversable.HTraversable (Data.HBifunctor.LeftF f)
- Data.HBifunctor: instance forall k1 k2 (f :: k1 -> *). Data.HFunctor.Internal.HFunctor (Data.HBifunctor.LeftF f)
- Data.HBifunctor: instance forall k1 k2 (g :: k1). Data.HFunctor.HTraversable.HTraversable (Data.HBifunctor.RightF g)
- Data.HBifunctor: instance forall k1 k2 (g :: k1). Data.HFunctor.Internal.HFunctor (Data.HBifunctor.RightF g)
- Data.HBifunctor.Associative: type family FunctorBy t :: (Type -> Type) -> Constraint;
- Data.HBifunctor.Tensor: type family ListBy t :: (Type -> Type) -> Type -> Type;
- Data.HFunctor: instance forall k (t :: (k -> *) -> k -> *). (Data.HFunctor.HBind t, Data.HFunctor.Inject t) => Data.HFunctor.HBind (Data.HFunctor.HLift t)
- Data.HFunctor: instance forall k (t :: (k -> *) -> k -> *). Data.HFunctor.Internal.HFunctor t => Data.HFunctor.Internal.HFunctor (Data.HFunctor.HFree t)
- Data.HFunctor: instance forall k (t :: (k -> *) -> k -> *). Data.HFunctor.Internal.HFunctor t => Data.HFunctor.Internal.HFunctor (Data.HFunctor.HLift t)
- Data.HFunctor.Chain: instance (Data.HFunctor.Internal.HBifunctor t, Data.HBifunctor.Associative.SemigroupIn t f) => Data.HFunctor.Interpret.Interpret (Data.HFunctor.Chain.Internal.Chain1 t) f
- Data.HFunctor.Final: instance forall k (c :: (k -> *) -> GHC.Types.Constraint). Data.HFunctor.Internal.HFunctor (Data.HFunctor.Final.Final c)
- Data.HFunctor.Final: type family FreeFunctorBy t :: (Type -> Type) -> Constraint;
- Data.HFunctor.HTraversable: instance Data.HFunctor.HTraversable.HTraversable (Control.Applicative.ListF.MapF k2)
- Data.HFunctor.HTraversable: instance Data.HFunctor.HTraversable.HTraversable (Control.Applicative.ListF.NEMapF k2)
- Data.HFunctor.HTraversable: instance Data.HFunctor.HTraversable.HTraversable1 (Control.Applicative.ListF.NEMapF k2)
- Data.HFunctor.HTraversable: instance forall k (f :: k -> *). Data.HFunctor.HTraversable.HTraversable ((GHC.Generics.:*:) f)
- Data.HFunctor.HTraversable: instance forall k (f :: k -> *). Data.HFunctor.HTraversable.HTraversable ((GHC.Generics.:+:) f)
- Data.HFunctor.HTraversable: instance forall k (f :: k -> *). Data.HFunctor.HTraversable.HTraversable (Data.Functor.Product.Product f)
- Data.HFunctor.HTraversable: instance forall k (f :: k -> *). Data.HFunctor.HTraversable.HTraversable (Data.Functor.Sum.Sum f)
- Data.HFunctor.HTraversable: instance forall k (f :: k -> *). Data.HFunctor.HTraversable.HTraversable1 ((GHC.Generics.:*:) f)
- Data.HFunctor.HTraversable: instance forall k (f :: k -> *). Data.HFunctor.HTraversable.HTraversable1 (Data.Functor.Product.Product f)
- Data.HFunctor.HTraversable: instance forall k (t :: (k -> *) -> k -> *). Data.HFunctor.HTraversable.HTraversable t => Data.HFunctor.HTraversable.HTraversable (Data.HFunctor.HFree t)
- Data.HFunctor.HTraversable: instance forall k (t :: (k -> *) -> k -> *). Data.HFunctor.HTraversable.HTraversable t => Data.HFunctor.HTraversable.HTraversable (Data.HFunctor.HLift t)
- Data.HFunctor.HTraversable: instance forall k (t :: (k -> *) -> k -> *). Data.HFunctor.HTraversable.HTraversable1 t => Data.HFunctor.HTraversable.HTraversable1 (Data.HFunctor.HFree t)
- Data.HFunctor.HTraversable: instance forall k (t :: (k -> *) -> k -> *). Data.HFunctor.HTraversable.HTraversable1 t => Data.HFunctor.HTraversable.HTraversable1 (Data.HFunctor.HLift t)
- Data.HFunctor.HTraversable: instance forall k1 k2 (f :: k1 -> *). Data.HFunctor.HTraversable.HTraversable (Data.Bifunctor.Joker.Joker f)
- Data.HFunctor.Interpret: instance forall k1 k2 (t :: (k1 -> *) -> k2 -> *). Data.HFunctor.Internal.HFunctor t => Data.HFunctor.Internal.HFunctor (Data.HFunctor.Interpret.WrapHF t)
+ Data.Functor.Combinator: infixr 9 `ComposeT`
+ Data.Functor.Combinator: type ListBy t :: (Type -> Type) -> Type -> Type;
+ Data.Functor.Combinator: type NonEmptyBy t :: (Type -> Type) -> Type -> Type;
+ Data.Functor.Invariant.Inplicative: instance Data.Hashable.Class.Hashable k => Data.Functor.Invariant.Inplicative.Inply (Data.HashMap.Internal.HashMap k)
+ Data.Functor.Invariant.Internative: instance Data.Hashable.Class.Hashable k => Data.Functor.Invariant.Internative.Inalt (Data.HashMap.Internal.HashMap k)
+ Data.HBifunctor: instance forall k k1 (g :: k). Data.HFunctor.HTraversable.HTraversable (Data.HBifunctor.RightF g)
+ Data.HBifunctor: instance forall k k1 (g :: k). Data.HFunctor.Internal.HFunctor (Data.HBifunctor.RightF g)
+ Data.HBifunctor: instance forall k1 k (f :: k1 -> *). Data.HFunctor.HTraversable.HTraversable (Data.HBifunctor.LeftF f)
+ Data.HBifunctor: instance forall k1 k (f :: k1 -> *). Data.HFunctor.Internal.HFunctor (Data.HBifunctor.LeftF f)
+ Data.HBifunctor.Associative: type NonEmptyBy t :: (Type -> Type) -> Type -> Type;
+ Data.HBifunctor.Tensor: type ListBy t :: (Type -> Type) -> Type -> Type;
+ Data.HFunctor: instance forall k (t :: (k -> *) -> k -> *). Data.HFunctor.HBind t => Data.HFunctor.HBind (Data.HFunctor.HLift t)
+ Data.HFunctor: instance forall k1 (t :: (k1 -> *) -> k1 -> *). Data.HFunctor.Internal.HFunctor t => Data.HFunctor.Internal.HFunctor (Data.HFunctor.HFree t)
+ Data.HFunctor: instance forall k1 (t :: (k1 -> *) -> k1 -> *). Data.HFunctor.Internal.HFunctor t => Data.HFunctor.Internal.HFunctor (Data.HFunctor.HLift t)
+ Data.HFunctor.Chain: instance Data.HBifunctor.Associative.SemigroupIn t f => Data.HFunctor.Interpret.Interpret (Data.HFunctor.Chain.Internal.Chain1 t) f
+ Data.HFunctor.Final: instance forall k1 (c :: (k1 -> *) -> GHC.Types.Constraint). Data.HFunctor.Internal.HFunctor (Data.HFunctor.Final.Final c)
+ Data.HFunctor.HTraversable: instance Data.HFunctor.HTraversable.HTraversable (Control.Applicative.ListF.MapF k)
+ Data.HFunctor.HTraversable: instance Data.HFunctor.HTraversable.HTraversable (Control.Applicative.ListF.NEMapF k)
+ Data.HFunctor.HTraversable: instance Data.HFunctor.HTraversable.HTraversable1 (Control.Applicative.ListF.NEMapF k)
+ Data.HFunctor.HTraversable: instance forall k1 (f :: k1 -> *). Data.HFunctor.HTraversable.HTraversable ((GHC.Generics.:*:) f)
+ Data.HFunctor.HTraversable: instance forall k1 (f :: k1 -> *). Data.HFunctor.HTraversable.HTraversable ((GHC.Generics.:+:) f)
+ Data.HFunctor.HTraversable: instance forall k1 (f :: k1 -> *). Data.HFunctor.HTraversable.HTraversable (Data.Functor.Product.Product f)
+ Data.HFunctor.HTraversable: instance forall k1 (f :: k1 -> *). Data.HFunctor.HTraversable.HTraversable (Data.Functor.Sum.Sum f)
+ Data.HFunctor.HTraversable: instance forall k1 (f :: k1 -> *). Data.HFunctor.HTraversable.HTraversable1 ((GHC.Generics.:*:) f)
+ Data.HFunctor.HTraversable: instance forall k1 (f :: k1 -> *). Data.HFunctor.HTraversable.HTraversable1 (Data.Functor.Product.Product f)
+ Data.HFunctor.HTraversable: instance forall k1 (t :: (k1 -> *) -> k1 -> *). Data.HFunctor.HTraversable.HTraversable t => Data.HFunctor.HTraversable.HTraversable (Data.HFunctor.HFree t)
+ Data.HFunctor.HTraversable: instance forall k1 (t :: (k1 -> *) -> k1 -> *). Data.HFunctor.HTraversable.HTraversable t => Data.HFunctor.HTraversable.HTraversable (Data.HFunctor.HLift t)
+ Data.HFunctor.HTraversable: instance forall k1 (t :: (k1 -> *) -> k1 -> *). Data.HFunctor.HTraversable.HTraversable1 t => Data.HFunctor.HTraversable.HTraversable1 (Data.HFunctor.HFree t)
+ Data.HFunctor.HTraversable: instance forall k1 (t :: (k1 -> *) -> k1 -> *). Data.HFunctor.HTraversable.HTraversable1 t => Data.HFunctor.HTraversable.HTraversable1 (Data.HFunctor.HLift t)
+ Data.HFunctor.HTraversable: instance forall k1 k (f :: k1 -> *). Data.HFunctor.HTraversable.HTraversable (Data.Bifunctor.Joker.Joker f)
+ Data.HFunctor.Interpret: instance forall k k1 (t :: (k -> *) -> k1 -> *). Data.HFunctor.Internal.HFunctor t => Data.HFunctor.Internal.HFunctor (Data.HFunctor.Interpret.WrapHF t)
- Data.HFunctor.Chain: matchingChain :: forall t i f. (Tensor t i, Matchable t i, FunctorBy t f) => Chain t i f <~> (i :+: Chain1 t f)
+ Data.HFunctor.Chain: matchingChain :: forall t i f. (Matchable t i, FunctorBy t f) => Chain t i f <~> (i :+: Chain1 t f)

Files

CHANGELOG.md view
@@ -1,6 +1,15 @@ Changelog ========= +Version 0.4.1.1+---------------++*January 29, 2023*++<https://github.com/mstksg/functor-combinators/releases/tag/v0.4.1.1>++*   Fix builds and warnings for GHC 9.2 and base 4.16+ Version 0.4.1.0 --------------- 
functor-combinators.cabal view
@@ -7,7 +7,7 @@ -- hash: c98f05061d45352f630dd964c7671a2a414e5708a12f8f4f8a39d61b986f6f5d  name:           functor-combinators-version:        0.4.1.0+version:        0.4.1.1 synopsis:       Tools for functor combinator-based program design description:    Tools for working with /functor combinators/: types that take functors (or                 other indexed types) and returns a new functor that "enhances" or "mixes"
src/Control/Monad/Freer/Church.hs view
@@ -95,7 +95,7 @@     (<.>) = ap  instance Applicative (Free f) where-    pure  = return+    pure x = Free $ \p _ -> p x     (<*>) = (<.>)  instance Pointed (Free f) where@@ -105,7 +105,6 @@     x >>- f  = Free $ \p b -> runFree x (\y -> runFree (f y) p b) b  instance Monad (Free f) where-    return x = Free $ \p _ -> p x     (>>=)    = (>>-)  instance M.MonadFree f (Free f) where
src/Data/Functor/Invariant/Inplicative.hs view
@@ -463,10 +463,14 @@ deriving via WrappedFunctor Semigroup.Last instance Inply Semigroup.Last -- | @since 0.4.1.0 deriving via WrappedFunctor Semigroup.Last instance Inplicative Semigroup.Last++#if !MIN_VERSION_base(4,16,0) -- | @since 0.4.1.0 deriving via WrappedFunctor Semigroup.Option instance Inply Semigroup.Option -- | @since 0.4.1.0 deriving via WrappedFunctor Semigroup.Option instance Inplicative Semigroup.Option+#endif+ -- | @since 0.4.1.0 deriving via WrappedFunctor ZipList instance Inply ZipList -- | @since 0.4.1.0@@ -515,8 +519,17 @@ deriving via WrappedFunctor IM.IntMap instance Inply IM.IntMap -- | @since 0.4.1.0 deriving via WrappedFunctor (M.Map k) instance Ord k => Inply (M.Map k)++#if MIN_VERSION_base(4,16,0)+-- | Does not require Eq k since base-4.16+--+-- @since 0.4.1.0+deriving via WrappedFunctor (HM.HashMap k) instance Hashable k => Inply (HM.HashMap k)+#else -- | @since 0.4.1.0 deriving via WrappedFunctor (HM.HashMap k) instance (Hashable k, Eq k) => Inply (HM.HashMap k)+#endif+ -- | @since 0.4.1.0 deriving via WrappedFunctor (Const w :: Type -> Type) instance Semigroup w => Inply (Const w) -- | @since 0.4.1.0
src/Data/Functor/Invariant/Internative.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP         #-} {-# LANGUAGE DerivingVia #-}  -- |@@ -275,12 +276,16 @@ deriving via WrappedFunctor Semigroup.First instance Inalt Semigroup.First -- | @since 0.4.1.0 deriving via WrappedFunctor Semigroup.Last instance Inalt Semigroup.Last++#if !MIN_VERSION_base(4,16,0) -- | @since 0.4.1.0 deriving via WrappedFunctor Semigroup.Option instance Inalt Semigroup.Option -- | @since 0.4.1.0 deriving via WrappedFunctor Semigroup.Option instance Inplus Semigroup.Option -- | @since 0.4.1.0 deriving via WrappedFunctor Semigroup.Option instance Internative Semigroup.Option+#endif+ -- | @since 0.4.1.0 deriving via WrappedFunctor Monoid.First instance Inalt Monoid.First -- | @since 0.4.1.0@@ -319,8 +324,16 @@ deriving via WrappedFunctor (M.Map k) instance Ord k => Inalt (M.Map k) -- | @since 0.4.1.0 deriving via WrappedFunctor (NEM.NEMap k) instance Ord k => Inalt (NEM.NEMap k)--- | @since 0.4.1.0++#if MIN_VERSION_base(4,16,0)+-- | Does not require Eq k since base-4.16+--+-- @since 0.4.1.0+deriving via WrappedFunctor (HM.HashMap k) instance Hashable k => Inalt (HM.HashMap k)+#else deriving via WrappedFunctor (HM.HashMap k) instance (Hashable k, Eq k) => Inalt (HM.HashMap k)+#endif+ -- | @since 0.4.1.0 deriving via WrappedFunctor (WrappedMonad m) instance MonadPlus m => Inalt (WrappedMonad m) -- | @since 0.4.1.0
src/Data/HFunctor.hs view
@@ -655,12 +655,12 @@       where         EnvT e' y = f x -instance (HBind t, Inject t) => HBind (HLift t) where+instance HBind t => HBind (HLift t) where     hbind f = \case       HPure   x -> f x-      HOther x -> HOther $ (`hbind` x) $ \y -> case f y of+      HOther x -> HOther $ (\y -> case f y of         HPure  z -> inject z-        HOther z -> z+        HOther z -> z) `hbind` x  -- | 'HFree' is the "free 'HBind'" for any 'HFunctor' instance HFunctor t => HBind (HFree t) where
src/Data/HFunctor/Chain.hs view
@@ -88,7 +88,7 @@ import qualified Data.Functor.Invariant.Day           as ID import qualified Data.Functor.Invariant.Night         as IN -instance (HBifunctor t, SemigroupIn t f) => Interpret (Chain1 t) f where+instance SemigroupIn t f => Interpret (Chain1 t) f where     retract = \case       Done1 x  -> x       More1 xs -> binterpret id retract xs@@ -254,7 +254,7 @@ -- a non-empty linked list of @f@s.  This witnesses the fact that -- a @'Chain' t i f@ is either empty (@i@) or non-empty (@'Chain1' t f@). matchingChain-    :: forall t i f. (Tensor t i, Matchable t i, FunctorBy t f)+    :: forall t i f. (Matchable t i, FunctorBy t f)     => Chain t i f <~> i :+: Chain1 t f matchingChain = fromF unrolling               . matchingLB @t
src/Data/HFunctor/Final.hs view
@@ -168,7 +168,6 @@     (<*>)  = liftFinal2 (<*>)     liftA2 f = liftFinal2 (liftA2 f) instance Monad (Final Monad f) where-    return x = liftFinal0 (return x)     x >>= f  = Final $ \r -> do       y <- runFinal x r       runFinal (f y) r@@ -180,7 +179,6 @@     (<*>)  = liftFinal2 (<*>)     liftA2 f = liftFinal2 (liftA2 f) instance Monad (Final MonadPlus f) where-    return x = liftFinal0 (return x)     x >>= f  = Final $ \r -> do       y <- runFinal x r       runFinal (f y) r@@ -210,7 +208,6 @@     (<.>) = liftFinal2 (<*>)     liftF2 f = liftFinal2 (liftA2 f) instance Monad (Final (MonadReader r) f) where-    return x = liftFinal0 (return x)     x >>= f  = Final $ \r -> do       y <- runFinal x r       runFinal (f y) r
test/Tests/Util.hs view
@@ -110,10 +110,10 @@       Ap.Ap x xs -> showsBinaryWith gshowsPrec gshowsPrec "Ap" d x xs  instance GShow f => GShow (FA.Ap f) where-    gshowsPrec d = gshowsPrec @(Ap f) d . FA.runAp Ap.liftAp+    gshowsPrec d = gshowsPrec d . FA.runAp Ap.liftAp  instance GShow f => GShow (FAF.Ap f) where-    gshowsPrec d = gshowsPrec @(Ap f) d . FAF.runAp Ap.liftAp+    gshowsPrec d = gshowsPrec d . FAF.runAp Ap.liftAp  instance GShow f => Show (Ap f a) where     showsPrec = gshowsPrec