packages feed

species 0.4.0.1 → 0.4.1

raw patch · 10 files changed

+45/−8 lines, 10 filesdep −template-haskelldep ~basedep ~containersPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: template-haskell

Dependency ranges changed: base, containers

API changes (from Hackage documentation)

- Math.Combinatorics.Species: data f (:.:) g a
- Math.Combinatorics.Species.Enumerate: instance Math.Combinatorics.Species.Enumerate.Enumerable GHC.Base.Maybe
- Math.Combinatorics.Species.Enumerate: type family StructTy f :: * -> *;
- Math.Combinatorics.Species.Structures: data f (:.:) g a
+ Math.Combinatorics.Species: -- <a>Math.Combinatorics.Species.Structures</a>) that will map into
+ Math.Combinatorics.Species: -- <tt>f</tt>.
+ Math.Combinatorics.Species: -- | The standard structure type (see
+ Math.Combinatorics.Species: data ( (f :: Type -> Type) :.: (g :: Type -> Type) ) a
+ Math.Combinatorics.Species: type StructTy (f :: Type -> Type) :: Type -> Type;
+ Math.Combinatorics.Species.Enumerate: -- <a>Math.Combinatorics.Species.Structures</a>) that will map into
+ Math.Combinatorics.Species.Enumerate: -- <tt>f</tt>.
+ Math.Combinatorics.Species.Enumerate: -- | The standard structure type (see
+ Math.Combinatorics.Species.Enumerate: instance Math.Combinatorics.Species.Enumerate.Enumerable GHC.Maybe.Maybe
+ Math.Combinatorics.Species.Enumerate: type StructTy (f :: Type -> Type) :: Type -> Type;
+ Math.Combinatorics.Species.Structures: data ( (f :: Type -> Type) :.: (g :: Type -> Type) ) a
+ Math.Combinatorics.Species.Structures: type family Interp f (self :: Type -> Type) :: Type -> Type
- Math.Combinatorics.Species: (:*:) :: f a -> g a -> (:*:) f g a
+ Math.Combinatorics.Species: (:*:) :: f a -> g a -> (:*:) (f :: Type -> Type) (g :: Type -> Type) a
- Math.Combinatorics.Species: Comp :: (f (g a)) -> (:.:) f g a
+ Math.Combinatorics.Species: Comp :: f (g a) -> (:.:) (f :: Type -> Type) (g :: Type -> Type) a
- Math.Combinatorics.Species: Inl :: (f a) -> (:+:) f g a
+ Math.Combinatorics.Species: Inl :: f a -> (:+:) (f :: Type -> Type) (g :: Type -> Type) a
- Math.Combinatorics.Species: Inr :: (g a) -> (:+:) f g a
+ Math.Combinatorics.Species: Inr :: g a -> (:+:) (f :: Type -> Type) (g :: Type -> Type) a
- Math.Combinatorics.Species: [unComp] :: (:.:) f g a -> (f (g a))
+ Math.Combinatorics.Species: [unComp] :: (:.:) (f :: Type -> Type) (g :: Type -> Type) a -> f (g a)
- Math.Combinatorics.Species: apply :: (ASTFunctor f, Typeable g) => f -> TSpeciesAST g -> TSpeciesAST (Interp f g)
+ Math.Combinatorics.Species: apply :: forall (g :: Type -> Type). (ASTFunctor f, Typeable g) => f -> TSpeciesAST g -> TSpeciesAST (Interp f g)
- Math.Combinatorics.Species: class (Typeable f, Show f, Typeable (Interp f (Mu f))) => ASTFunctor f
+ Math.Combinatorics.Species: class (Typeable f, Show f, Typeable Interp f Mu f) => ASTFunctor f
- Math.Combinatorics.Species: class Typeable (StructTy f) => Enumerable (f :: * -> *) where {
+ Math.Combinatorics.Species: class Typeable StructTy f => Enumerable (f :: Type -> Type) where {
- Math.Combinatorics.Species: class (C s) => Species s
+ Math.Combinatorics.Species: class C s => Species s
- Math.Combinatorics.Species: data TSpeciesAST (s :: * -> *)
+ Math.Combinatorics.Species: data TSpeciesAST (s :: Type -> Type)
- Math.Combinatorics.Species: erase' :: TSpeciesAST f -> SpeciesAST
+ Math.Combinatorics.Species: erase' :: forall (f :: Type -> Type). TSpeciesAST f -> SpeciesAST
- Math.Combinatorics.Species: oneHole :: (Species s) => s -> s
+ Math.Combinatorics.Species: oneHole :: Species s => s -> s
- Math.Combinatorics.Species: type family StructTy f :: * -> *;
+ Math.Combinatorics.Species: type family Interp f (self :: Type -> Type) :: Type -> Type
- Math.Combinatorics.Species: unwrap :: Typeable s => ESpeciesAST -> TSpeciesAST s
+ Math.Combinatorics.Species: unwrap :: forall (s :: Type -> Type). Typeable s => ESpeciesAST -> TSpeciesAST s
- Math.Combinatorics.Species: wrap :: Typeable s => TSpeciesAST s -> ESpeciesAST
+ Math.Combinatorics.Species: wrap :: forall (s :: Type -> Type). Typeable s => TSpeciesAST s -> ESpeciesAST
- Math.Combinatorics.Species.AST: [:*::] :: SizedSpeciesAST f -> SizedSpeciesAST g -> TSpeciesAST (f :*: g)
+ Math.Combinatorics.Species.AST: [:*::] :: forall (f :: Type -> Type) (g :: Type -> Type). SizedSpeciesAST f -> SizedSpeciesAST g -> TSpeciesAST (f :*: g)
- Math.Combinatorics.Species.AST: [:+::] :: SizedSpeciesAST f -> SizedSpeciesAST g -> TSpeciesAST (f :+: g)
+ Math.Combinatorics.Species.AST: [:+::] :: forall (f :: Type -> Type) (g :: Type -> Type). SizedSpeciesAST f -> SizedSpeciesAST g -> TSpeciesAST (f :+: g)
- Math.Combinatorics.Species.AST: [:.::] :: SizedSpeciesAST f -> SizedSpeciesAST g -> TSpeciesAST (f :.: g)
+ Math.Combinatorics.Species.AST: [:.::] :: forall (f :: Type -> Type) (g :: Type -> Type). SizedSpeciesAST f -> SizedSpeciesAST g -> TSpeciesAST (f :.: g)
- Math.Combinatorics.Species.AST: [:><::] :: SizedSpeciesAST f -> SizedSpeciesAST g -> TSpeciesAST (f :*: g)
+ Math.Combinatorics.Species.AST: [:><::] :: forall (f :: Type -> Type) (g :: Type -> Type). SizedSpeciesAST f -> SizedSpeciesAST g -> TSpeciesAST (f :*: g)
- Math.Combinatorics.Species.AST: [:@::] :: SizedSpeciesAST f -> SizedSpeciesAST g -> TSpeciesAST (f :.: g)
+ Math.Combinatorics.Species.AST: [:@::] :: forall (f :: Type -> Type) (g :: Type -> Type). SizedSpeciesAST f -> SizedSpeciesAST g -> TSpeciesAST (f :.: g)
- Math.Combinatorics.Species.AST: [Rec] :: ASTFunctor f => f -> SpeciesAST
+ Math.Combinatorics.Species.AST: [Rec] :: forall f. ASTFunctor f => f -> SpeciesAST
- Math.Combinatorics.Species.AST: [Sized] :: Interval -> TSpeciesAST s -> SizedSpeciesAST s
+ Math.Combinatorics.Species.AST: [Sized] :: forall (s :: Type -> Type). Interval -> TSpeciesAST s -> SizedSpeciesAST s
- Math.Combinatorics.Species.AST: [TDer] :: SizedSpeciesAST f -> TSpeciesAST (f :.: Star)
+ Math.Combinatorics.Species.AST: [TDer] :: forall (f :: Type -> Type). SizedSpeciesAST f -> TSpeciesAST (f :.: Star)
- Math.Combinatorics.Species.AST: [TNonEmpty] :: SizedSpeciesAST f -> TSpeciesAST f
+ Math.Combinatorics.Species.AST: [TNonEmpty] :: forall (s :: Type -> Type). SizedSpeciesAST s -> TSpeciesAST s
- Math.Combinatorics.Species.AST: [TOfSizeExactly] :: SizedSpeciesAST f -> Integer -> TSpeciesAST f
+ Math.Combinatorics.Species.AST: [TOfSizeExactly] :: forall (s :: Type -> Type). SizedSpeciesAST s -> Integer -> TSpeciesAST s
- Math.Combinatorics.Species.AST: [TOfSize] :: SizedSpeciesAST f -> (Integer -> Bool) -> TSpeciesAST f
+ Math.Combinatorics.Species.AST: [TOfSize] :: forall (s :: Type -> Type). SizedSpeciesAST s -> (Integer -> Bool) -> TSpeciesAST s
- Math.Combinatorics.Species.AST: [TRec] :: ASTFunctor f => f -> TSpeciesAST (Mu f)
+ Math.Combinatorics.Species.AST: [TRec] :: forall f. ASTFunctor f => f -> TSpeciesAST (Mu f)
- Math.Combinatorics.Species.AST: [Wrap] :: Typeable s => SizedSpeciesAST s -> ESpeciesAST
+ Math.Combinatorics.Species.AST: [Wrap] :: forall (s :: Type -> Type). Typeable s => SizedSpeciesAST s -> ESpeciesAST
- Math.Combinatorics.Species.AST: annI :: TSpeciesAST s -> SizedSpeciesAST s
+ Math.Combinatorics.Species.AST: annI :: forall (s :: Type -> Type). TSpeciesAST s -> SizedSpeciesAST s
- Math.Combinatorics.Species.AST: apply :: (ASTFunctor f, Typeable g) => f -> TSpeciesAST g -> TSpeciesAST (Interp f g)
+ Math.Combinatorics.Species.AST: apply :: forall (g :: Type -> Type). (ASTFunctor f, Typeable g) => f -> TSpeciesAST g -> TSpeciesAST (Interp f g)
- Math.Combinatorics.Species.AST: class (Typeable f, Show f, Typeable (Interp f (Mu f))) => ASTFunctor f
+ Math.Combinatorics.Species.AST: class (Typeable f, Show f, Typeable Interp f Mu f) => ASTFunctor f
- Math.Combinatorics.Species.AST: data SizedSpeciesAST (s :: * -> *)
+ Math.Combinatorics.Species.AST: data SizedSpeciesAST (s :: Type -> Type)
- Math.Combinatorics.Species.AST: data TSpeciesAST (s :: * -> *)
+ Math.Combinatorics.Species.AST: data TSpeciesAST (s :: Type -> Type)
- Math.Combinatorics.Species.AST: erase' :: TSpeciesAST f -> SpeciesAST
+ Math.Combinatorics.Species.AST: erase' :: forall (f :: Type -> Type). TSpeciesAST f -> SpeciesAST
- Math.Combinatorics.Species.AST: getI :: SizedSpeciesAST s -> Interval
+ Math.Combinatorics.Species.AST: getI :: forall (s :: Type -> Type). SizedSpeciesAST s -> Interval
- Math.Combinatorics.Species.AST: interval :: TSpeciesAST s -> Interval
+ Math.Combinatorics.Species.AST: interval :: forall (s :: Type -> Type). TSpeciesAST s -> Interval
- Math.Combinatorics.Species.AST: stripI :: SizedSpeciesAST s -> TSpeciesAST s
+ Math.Combinatorics.Species.AST: stripI :: forall (s :: Type -> Type). SizedSpeciesAST s -> TSpeciesAST s
- Math.Combinatorics.Species.AST: unwrap :: Typeable s => ESpeciesAST -> TSpeciesAST s
+ Math.Combinatorics.Species.AST: unwrap :: forall (s :: Type -> Type). Typeable s => ESpeciesAST -> TSpeciesAST s
- Math.Combinatorics.Species.AST: wrap :: Typeable s => TSpeciesAST s -> ESpeciesAST
+ Math.Combinatorics.Species.AST: wrap :: forall (s :: Type -> Type). Typeable s => TSpeciesAST s -> ESpeciesAST
- Math.Combinatorics.Species.AST.Instances: reflectT :: Species s => TSpeciesAST f -> s
+ Math.Combinatorics.Species.AST.Instances: reflectT :: forall s (f :: Type -> Type). Species s => TSpeciesAST f -> s
- Math.Combinatorics.Species.Class: class (C s) => Species s
+ Math.Combinatorics.Species.Class: class C s => Species s
- Math.Combinatorics.Species.Class: oneHole :: (Species s) => s -> s
+ Math.Combinatorics.Species.Class: oneHole :: Species s => s -> s
- Math.Combinatorics.Species.Enumerate: [Structure] :: Typeable f => f a -> Structure a
+ Math.Combinatorics.Species.Enumerate: [Structure] :: forall (f :: Type -> Type) a. Typeable f => f a -> Structure a
- Math.Combinatorics.Species.Enumerate: class Typeable (StructTy f) => Enumerable (f :: * -> *) where {
+ Math.Combinatorics.Species.Enumerate: class Typeable StructTy f => Enumerable (f :: Type -> Type) where {
- Math.Combinatorics.Species.Enumerate: extractStructure :: forall f a. (Enumerable f, Typeable a) => Structure a -> Either String (f a)
+ Math.Combinatorics.Species.Enumerate: extractStructure :: (Enumerable f, Typeable a) => Structure a -> Either String (f a)
- Math.Combinatorics.Species.Structures: (:*:) :: f a -> g a -> (:*:) f g a
+ Math.Combinatorics.Species.Structures: (:*:) :: f a -> g a -> (:*:) (f :: Type -> Type) (g :: Type -> Type) a
- Math.Combinatorics.Species.Structures: Comp :: (f (g a)) -> (:.:) f g a
+ Math.Combinatorics.Species.Structures: Comp :: f (g a) -> (:.:) (f :: Type -> Type) (g :: Type -> Type) a
- Math.Combinatorics.Species.Structures: Inl :: (f a) -> (:+:) f g a
+ Math.Combinatorics.Species.Structures: Inl :: f a -> (:+:) (f :: Type -> Type) (g :: Type -> Type) a
- Math.Combinatorics.Species.Structures: Inr :: (g a) -> (:+:) f g a
+ Math.Combinatorics.Species.Structures: Inr :: g a -> (:+:) (f :: Type -> Type) (g :: Type -> Type) a
- Math.Combinatorics.Species.Structures: [unComp] :: (:.:) f g a -> (f (g a))
+ Math.Combinatorics.Species.Structures: [unComp] :: (:.:) (f :: Type -> Type) (g :: Type -> Type) a -> f (g a)
- Math.Combinatorics.Species.Types: CI :: (T Rational) -> CycleIndex
+ Math.Combinatorics.Species.Types: CI :: T Rational -> CycleIndex
- Math.Combinatorics.Species.Types: GF :: (T Integer) -> GF
+ Math.Combinatorics.Species.Types: GF :: T Integer -> GF
- Math.Combinatorics.Species.Types: filterCoeffs :: (C a) => (Integer -> Bool) -> [a] -> [a]
+ Math.Combinatorics.Species.Types: filterCoeffs :: C a => (Integer -> Bool) -> [a] -> [a]

Files

CHANGES view
@@ -1,3 +1,32 @@+0.4.1 30 Sep 2025++  * Allow `containers-0.8` and `base-4.21`+  * Test on GHC 9.10 and 9.12+  * Fix various warnings+  * Remove unused template-haskell dependency++0.4.0.1-r5 12 Feb 2024++  * Allow base-4.18 and -4.19 (GHC 9.6, 9.8)+  * Drop support for GHC < 8.4++0.4.0.1-r4 13 May 2022++  * Allow base-4.17 (GHC 9.4)++0.4.0.1-r3 13 May 2022++  * Allow base-4.16 (GHC 9.2)++0.4.0.1-r2 18 January 2019++  * Allow base-4.12 (GHC 8.6)+  * Allow containers-0.6++0.4.0.1-r1 25 April 2018++  * Allow base-4.11 (GHC 8.4)+ 0.4.0.1    10 April 2018    * bug fix in 'structureType' function (https://github.com/byorgey/species/issues/3)
Math/Combinatorics/Species/AST/Instances.hs view
@@ -185,6 +185,7 @@   showsPrec _ (OfSizeExactly f n) = showsPrec 11 f . shows n   showsPrec _ (NonEmpty f)        = showsPrec 11 f . showChar '+'   showsPrec _ (Rec f)             = shows f+  showsPrec _ Omega               = showString "ω"  -- | Species expressions are additive. instance Additive.C SpeciesAST where
Math/Combinatorics/Species/Class.hs view
@@ -178,7 +178,7 @@   --   in for recursive occurrences of a species.   omega :: s -  {-# MINIMAL singleton, set, cycle, bracelet, o, (><), (@@), ofSize #-}+  {-# MINIMAL singleton, set, cycle, bracelet, o, (><), (@@), ofSize, rec, omega #-}  -- | A convenient synonym for differentiation.  @'oneHole' -- f@-structures look like @f@-structures on a set formed by adjoining
Math/Combinatorics/Species/CycleIndex.hs view
@@ -85,6 +85,8 @@                    "Unable to express " ++ show f ++ " in the form T = TX*R(T)."                  Just ls -> ls +  omega      = error "omega CycleIndex unimplemented"+ -- | Convert an integer partition to the corresponding monomial in the --   cycle index series for the species of sets: 1/aut(js) * prod_i xi^ji. partToMonomial :: CycleType -> Monomial.T Rational@@ -183,6 +185,7 @@       | n < pow   = genericReplicate (pow - n) zero                     ++ insertZeros' (genericDrop (pow - n) (n:ns)) ((pow,c):pcs)       | otherwise = c : insertZeros' ns pcs+    insertZeros' [] _ = error "impossible! insertZeros' encountered empty index list"  -- | Hadamard product. hadamard :: (Ring.C a, ZeroTestable.C a) => [Monomial.T a] -> [Monomial.T a] -> [Monomial.T a]
Math/Combinatorics/Species/Enumerate.hs view
@@ -150,6 +150,7 @@   | (fromIntegral . sum . MS.getCounts $ xs) == n     = enumerate' (stripI f) xs   | otherwise = []+enumerate' TOmega _ = []  -- | An existential wrapper for structures, hiding the structure --   functor and ensuring that it is 'Typeable'.
Math/Combinatorics/Species/Labeled.hs view
@@ -70,6 +70,8 @@             Nothing -> error $ "Unable to express " ++ show f ++ " in the form T = TX*R(T)."             Just ls -> ls +  omega = error "omega EGF unimplemented"+ -- | Extract the coefficients of an exponential generating function as --   a list of 'Integer's.  Since 'EGF' is an instance of 'Species', the --   idea is that 'labeled' can be applied directly to an expression
Math/Combinatorics/Species/Simplify.hs view
@@ -40,6 +40,7 @@ simplify X             =  X simplify E             =  E simplify C             =  C+simplify B             =  B simplify L             =  L simplify Subset        =  Subset simplify f@(KSubset _) =  f
Math/Combinatorics/Species/Unlabeled.hs view
@@ -53,6 +53,7 @@                         Nothing -> error $                           "Unable to express " ++ show f ++ " in the form T = TX*R(T)."                         Just ls -> ls+  omega      = error "omega GF unimplemented"  unlabeledCoeffs :: GF -> [Integer] unlabeledCoeffs (GF p) = PS.coeffs p ++ repeat 0
Math/Combinatorics/Species/Util/Interval.hs view
@@ -133,7 +133,7 @@  -- | Convert an interval to a list of Integers. toList :: Interval -> [Integer]-toList (I Omega Omega) = []+toList (I Omega _) = [] toList (I lo hi) | lo > hi = [] toList (I (Nat lo) Omega) = [lo..] toList (I (Nat lo) (Nat hi)) = [lo..hi]
species.cabal view
@@ -1,10 +1,10 @@ name:           species-version:        0.4.0.1+version:        0.4.1 license:        BSD3 license-file:   LICENSE build-type:     Simple cabal-version:  >= 1.10-tested-with:    GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1+tested-with:    GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1 author:         Brent Yorgey maintainer:     Brent Yorgey <byorgey@gmail.com> bug-reports:    https://github.com/byorgey/species/issues@@ -20,12 +20,11 @@   location: https://github.com/byorgey/species  Library-  build-depends: base >= 4.7 && < 4.11,+  build-depends: base >= 4.7 && < 4.22,                  numeric-prelude >= 0.3 && < 0.5,                  np-extras >= 0.3 && < 0.4,-                 containers >= 0.2 && < 0.6,-                 multiset-comb >= 0.2.4 && < 0.3,-                 template-haskell >= 2.7 && < 3.0+                 containers >= 0.2 && < 0.9,+                 multiset-comb >= 0.2.4 && < 0.3   exposed-modules:     Math.Combinatorics.Species     Math.Combinatorics.Species.Class