
Math.Combinatorics.Species.Types 




Description 
Some common types used by the species library, along with some
utility functions.


Synopsis 




Miscellaneous



A representation of the cycle type of a permutation. If c ::
CycleType and (k,n) elem c, then the permutation has n
cycles of size k.


Lazy multiplication



If T is an instance of Ring, then LazyRing T is isomorphic
to T but with a lazy multiplication: 0 * undefined = undefined * 0
= 0.
 Constructors   Instances  






Series types



Exponential generating functions, for counting labelled species.
 Constructors   Instances  









Ordinary generating functions, for counting unlabelled species.
 Constructors   Instances  









Cycle index series.
 Constructors   Instances  









Filter the coefficients of a series according to a predicate.



Set every coefficient of a series to 0 except the selected
index. Truncate any trailing zeroes.


Higherorder Show



When generating species, we build up a functor representing
structures of that species; in order to display generated
structures, we need to know that applying the computed functor to
a Showable type will also yield something Showable.
  Methods    Instances  



RawString is like String, but with a Show instance that doesn't
add quotes or do any escaping. This is a (somewhat silly) hack
needed to implement a ShowF instance for Comp.
 Constructors   Instances  


Structure functors


Functors used in building up structures for species
generation. Many of these functors are already defined elsewhere,
in other packages; but to avoid a plethora of imports, inconsistent
naming/instance schemes, etc., we just redefine them here.



The constant functor.
 Constructors   Instances  



The identity functor.
 Constructors   Instances  



Functor coproduct.
 Constructors   Instances  



Functor product.
 Constructors   Instances  



Functor composition.
 Constructors   Instances  



Cycle structure. A value of type 'Cycle a' is implemented as
'[a]', but thought of as a directed cycle.
 Constructors   Instances  



Set structure. A value of type 'Set a' is implemented as '[a]',
but thought of as an unordered set.
 Constructors   Instances  



Star is isomorphic to Maybe, but with a more useful Show
instance for our purposes. Used to implement species
differentiation.
 Constructors   Instances  


Typelevel species


Some constructorless data types used as indices to
SpeciesTypedAST to reflect the species structure at the type
level. This is the point at which we wish we were doing this in a
dependently typed language.




























type family StructureF t :: * > *  Source 

StructureF is a type function which maps typelevel species
descriptions to structure functors. That is, a structure of the
species with typelevel representation s, on the underlying set
a, has type StructureF s a.



Produced by Haddock version 2.6.0 