[auto ekmett@gmail.com**20090409090359 Ignore-this: 9d8c078002a0408bb3246f5cbc7aa6d0 ] { addfile ./doc/html/monoids/Data-Monoid-Sugar.html addfile ./doc/html/monoids/src/Data-Monoid-Sugar.html addfile ./monoids-0.1.35.tar.gz hunk ./doc/html/monoids/Data-Generator-Combinators.html 22 ->monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkEq a => Module Natural (RLE Seq a)Eq a => RightModule Natural (RLE Seq a)Eq a => LeftModule Natural (RLE Seq a)monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkModuleRightModuleRightModuleLeftModuleLeftModuleModulemonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework IntSetGenerator (IntMap v)Generator (Seq c)Generator (Set a)GeneratorIx i => Generator (Values (Array i e))Generator (Values (IntMap v))Generator (Values (Map k v))Ix i => Generator (Keys (Array i e))Generator (Keys (IntMap v))Generator (Keys (Map k v))Ix i => Generator (Array i e)Generator (Map k v)show/hide Instances
Ix i => Generator (Keys (Array i e))
Generator (Keys (IntMap v))
Generator (Keys (Map k v))
show/hide Instances
Ix i => Generator (Values (Array i e))
Generator (Values (IntMap v))
Generator (Values (Map k v))
monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework import Prelude hiding ((-), (+), negate, subtract) +> import Prelude hiding ((-), (+), (*), (/), (^), (^^), negate, subtract, recip) hunk ./doc/html/monoids/Data-Group-Sugar.html 112 ->module Data.Monoid.Additive.Sugarmodule Data.Monoid.Sugar
(/) :: MultiplicativeGroup g => g -> g -> gSource
(.\.) :: MultiplicativeGroup g => g -> g -> gSource
(^^) :: MultiplicativeGroup g => g -> Integer -> gSource
recip :: MultiplicativeGroup g => g -> gSource
monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmodule Data.Monoid.Additivemodule Data.Monoid.Multiplicativeclass Multiplicative g => MultiplicativeGroup g where
over :: g -> g -> g
under :: g -> g -> g
grecip :: g -> g
over :: MultiplicativeGroup g => g -> g -> gunder :: MultiplicativeGroup g => g -> g -> ggrecip :: MultiplicativeGroup g => g -> gmodule Data.Monoid.Additivemodule Data.Monoid.Multiplicative BoolRingGroupMultiplicativeGroup g => Group (Log g)GroupBits (ReducedBy a s) (Boolean a)(Modular s a, Integral a) => (Mod a => Group (ReducedBy(Modular s a, Integral a) => Group (Mod a s) r, Module r, Bimodule
class Multiplicative g => MultiplicativeGroup g whereSource
Minimal definition over or grecip +
Methods
over :: g -> g -> gSource
x / y
under :: g -> g -> gSource
x  y
grecip :: g -> gSource
show/hide Instances
over :: MultiplicativeGroup g => g -> g -> gSource
x / y
under :: MultiplicativeGroup g => g -> g -> gSource
x  y
grecip :: MultiplicativeGroup g => g -> gSource
monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmodule Data.Ring.Semi.Nearmodule Data.Ring.Semi.Near f => Module f => RightModule f => RightModule f => LeftModule f => LeftModule f => Module f => Module f => RightModule f => RightModule f => LeftModule f => LeftModule f => Module a) => a) => a) => a) => (Module r m, Applicative f) => Module r (App f m)(Module r m, Applicative f) => Module r (App f m)monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework k => Module k => RightModule k => RightModule k => LeftModule k => LeftModule k => Module m => Module m => RightModule m => RightModule m => LeftModule m => LeftModule m => Modulemonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework m => Module m => RightModule m => RightModule m => LeftModule m => LeftModule m => ModuleRightSemiNearRing m => RightSemiNearRingMultiplicativeGroup g => MultiplicativeGroup m) g)LeftSemiNearRing m => LeftSemiNearRingGroup a => Group m) a)Ringoid m => RingoidField f => Field m) f)SemiRing r => SemiRingDivisionRing r => DivisionRingGroup a => GroupRing r => Ring a) r)MultiplicativeGroup g => MultiplicativeGroupSemiRing r => SemiRing g) r)Ring r => RingRightSemiNearRing m => RightSemiNearRing r) m)Field f => FieldLeftSemiNearRing m => LeftSemiNearRing f) m)Ringoid m => Ringoid (FromString m)monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework
  • Num and Bits instances for Bool as a Boolean &&/|| SemiRing +
  • monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkModuleRightModuleRightModuleLeftModuleLeftModuleModulemonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework m => Module m => RightModule m => RightModule m => LeftModule m => LeftModule m => Modulemonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmodule Data.Ring.Semi.Nearmodule Data.Ring.Modulemodule Data.Ring.Semi.Nearmodule Data.Ring.Module f => Module f => RightModule f => RightModule f => LeftModule f => LeftModule f => Module f => Module f => RightModule f => RightModule f => LeftModule f => LeftModule f => Module a) => a) => a) => a) => (Module r m, Monad f) => Module r (Mon f m)(Module r m, Monad f) => Module r (Mon f m)monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework import Prelude hiding ((+),(*)) +> import Prelude hiding ((+),(*),(^)) hunk ./doc/html/monoids/Data-Monoid-Multiplicative-Sugar.html 135 +>module Data.Ring.Semi.Natural
    (^) :: Multiplicative r => r -> Natural -> rSource
    monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework BoolRingMultiplicative (Seq m)Monoid m => MultiplicativeNum a => Multiplicative (FromNum a)Bits a => Multiplicative (Boolean a)(Bounded a, Enum a) => Multiplicative (BitSet a)Num a => Multiplicative (FromNum a)(Bounded a, Enum a) => Multiplicative (BitSet a)(Modular s a, Integral a) => Multiplicative (Mod a s)(Modular s a, Integral a) => Multiplicative (Mod a s)ModuleBimodule m => Module m => RightModule m => RightModule m => LeftModule m => LeftModule m => ModuleMultiplicativeGroup g => Group (Log g)Group g => MultiplicativeGroup (Exp g)monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework Bool BoolRingReducer Bool BoolRingReducer Int IntSetReducer Int IntSetReducerOrd a => Reducer a (Set a)Reducer a (Seq a)Reducer a (Free a)Bits a => Reducer a (Boolean a)Enum a => Reducer a (BitSet a)Reducer a (Free a)Enum a => Reducer a (BitSet a)(Ord c, Reducer c m) => Reducer c (Trie c m)(Ord c, Reducer c m) => Reducer c (Trie c m)(Module(BimoduleReducer ((,) Int v) (IntMap v)Reducer ((,) Int v) (IntMap v)Ord k => Reducer ((,) k v) (Map k v)Ord k => Reducer ((,) k v) (Map k v)RightSemiNearRing m => RightSemiNearRingMultiplicativeGroup g => MultiplicativeGroup m s) g s)LeftSemiNearRing m => LeftSemiNearRingGroup a => Group m s) a s)Ringoid m => RingoidField f => Field m s) f s)SemiRing r => SemiRingDivisionRing r => DivisionRingGroup a => GroupRing r => Ring a s) r s)MultiplicativeGroup g => MultiplicativeGroupSemiRing r => SemiRing g s) r s)Ring r => RingRightSemiNearRing m => RightSemiNearRing r s) m s)Field f => FieldLeftSemiNearRing m => LeftSemiNearRing f s) m s)Ringoid m => Ringoid (ReducedBy m s)monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework m => Module m => RightModule m => RightModule m => LeftModule m => LeftModule m => ModuleRightSemiNearRing m => RightSemiNearRingMultiplicativeGroup g => MultiplicativeGroup m) g)LeftSemiNearRing m => LeftSemiNearRingGroup a => Group m) a)Ringoid m => RingoidField f => Field m) f)SemiRing r => SemiRingDivisionRing r => DivisionRingGroup a => GroupRing r => Ring a) r)MultiplicativeGroup g => MultiplicativeGroupSemiRing r => SemiRing g) r)Ring r => RingRightSemiNearRing m => RightSemiNearRing r) m)Field f => FieldLeftSemiNearRing m => LeftSemiNearRing f) m)Ringoid m => Ringoid (Self m) + +Data.Monoid.Sugar
     monoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkSource codeContentsIndex
    Data.Monoid.Sugar
    Portabilityportable
    Stabilityexperimental
    Maintainerekmett@gmail.com
    Description

    Syntactic sugar for working with a Monoid and Multiplicative instances + that conflicts with names from the Prelude. +

     import Prelude hiding ((+),(*),(^))
    + import Data.Monoid.Sugar
    +
    Documentation
    module Data.Monoid.Multiplicative
    module Data.Ring.Semi.Natural
    (+) :: Monoid m => m -> m -> mSource
    (*) :: Multiplicative r => r -> r -> rSource
    (^) :: Multiplicative r => r -> Natural -> rSource
    Produced by Haddock version 2.3.0
    hunk ./doc/html/monoids/Data-Monoid-Union.html 22 ->monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework r, r, r) => Module r) => RightModule r, r, r) => RightModule r) => LeftModule r, r, r) => LeftModule r) => Modulemonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework

    over Bool. Note well that the over any Bits instance. Note well that the of this ring is - symmetric difference and not disjunction like you might expect. To get that - you should use use of this ring is xor. + You should use use -. +

    Also note that gnegate = id in a Boolean Ring! +

    BoolRing Boolean a BoolRingBooleangetBoolRing :: BoolgetBoolean :: ashow/hideshow/hide
    Bits a => Reducer a (Boolean a)Bits a => Bimodule Integer (Boolean a)Bits a => Bimodule Natural (Boolean a)Bits a => RightModule Integer (Boolean a)Bits a => RightModule Natural (Boolean a)Bits a => LeftModule Integer (Boolean a)Bits a => LeftModule Natural (Boolean a)Bits a => Module Integer (Boolean a)Bits a => Module Natural (Boolean a) BoolRing a => Eq (Boolean a) BoolRing a => Ord (Boolean a) BoolRing a => Read (Boolean a) BoolRing a => Show (Boolean a)Bits a => BoolRing (Boolean a)Arbitrary BoolRingArbitrary a => Arbitrary (Boolean a)CoArbitrary BoolRingCoArbitrary a => CoArbitrary (Boolean a)Bits a => BoolRing (Boolean a)Bits a => Group (Boolean a)Bits a => Ring (Boolean a)Bits a => SemiRing (Boolean a)Bits a => BoolRing (Boolean a)Bits a => BoolRing (Boolean a)Bits a => BoolRing (Boolean a)SemiRing BoolRingBits a => Normed (Boolean a) (Boolean a)Group BoolRingBits a => Bimodule (Boolean a) (Boolean a)Ring BoolRingBits a => RightModule (Boolean a) (Boolean a)Reducer Bool BoolRingBits a => LeftModule (Boolean a) (Boolean a)Bits a => Module (Boolean a) (Boolean a)monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework a => RightSemiNearRing a => Group a => LeftSemiNearRing a => Ring a => Ringoid a => SemiRing a => SemiRing a => RightSemiNearRing a => Group a => LeftSemiNearRing a => Ring a => Ringoidmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework a) => RightSemiNearRing a) => Group a) => LeftSemiNearRing a) => Ring a) => Ringoid a) => SemiRing a) => SemiRing a) => RightSemiNearRing a) => Group a) => LeftSemiNearRing a) => Ring a) => Ringoidmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework(Module(BimoduleModuleBimoduleModuleBimodule(RightSemiNearRing r, Module r m) => RightSemiNearRing(Group r, Bimodule r m, Group m) => Group(LeftSemiNearRing r, Module r m) => LeftSemiNearRing(Ring r, Bimodule r m, Group m) => Ring(Ringoid r, Module r m) => Ringoid(SemiRing r, Bimodule r m) => SemiRing(SemiRing r, Module r m) => SemiRing(RightSemiNearRing r, Bimodule r m) => RightSemiNearRing(Group r, Module r m, Group m) => Group(LeftSemiNearRing r, Bimodule r m) => LeftSemiNearRing(Ring r, Module r m, Group m) => Ring(Ringoid r, Bimodule r m) => Ringoid :: (Module r m, :: (Bimodule r m, :: Module :: Bimodulemonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework
    Contents
    R-Modules +
    R-Normed Modules +
    Vector Spaces +
    R-Algebras +
    (Monoid r, Multiplicative (Ringoid m) => m) => Module r m class Module r m => (Monoid r, Multiplicative r, Monoid m) => Module r m => r m) => r m) => Bimodule r m class r m => Normed r m where
    mabs :: m -> r
    mabs :: Normed r m => m -> rclass (Field f, Module f g) => VectorSpace f g class (Bimodule r m, Multiplicative m) => AlgebraR-Modules + ( (Ringoid r, r, m) => Module r m Source
    show/hide Instances
    Module Natural Ordering
    Module Natural Ordering
    Module Natural ()
    Module Natural ()
    Module Natural All
    Module Natural All
    Module Natural Any
    Module Natural Any
    Bits a => Module Integer (Boolean a)
    Bits a => Module Integer (Boolean a)
    Module Natural ([] a)
    Module Natural ([] a)
    Monoid m => Module Natural (Dual m)
    Monoid m => Module Natural (Dual m)
    Module Natural (Endo a)
    Module Natural (Endo a)
    Num a => Module Natural (Sum a)
    Num a => Module Natural (Sum a)
    Num a => Module Natural (Product a)
    Num a => Module Natural (Product a)
    Module Natural (First a)
    Module Natural (First a)
    Module Natural (Last a)
    Module Natural (Last a)
    CharReducer m => Module Natural (UTF8 m)
    CharReducer m => Module Natural (UTF8 m)
    Module Natural (SourcePosition f)
    Module Natural (SourcePosition f)
    Monoid m => Module Natural (Self m)
    Monoid m => Module Natural (Self m)
    Monoid m => Module Natural (FromString m)
    Monoid m => Module Natural (FromString m)
    r, m => Module Natural (Log m)
    Multiplicative m => Module Natural (Log m)
    Applicative f => Module Natural (Traversal f)
    Applicative f => Module Natural (Traversal f)
    Monad f => Module Natural (Action f)
    Monad f => Module Natural (Action f)
    Module Natural (Free a)
    Module Natural (Free a)
    Bits a => Module Natural (Boolean a)
    Bits a => Module Natural (Boolean a)
    Enum a => Module Natural (BitSet a)
    Enum a => Module Natural (BitSet a)
    (Ord a, Num a) => Module Natural (Tropical a)
    (Ord a, Num a) => Module Natural (Tropical a)
    (HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => Module r (UnionWith f r)
    (Module r m, Module r n) => Module r ((,) m n)
    (Module r m, Applicative f) => Module r (App f m)
    (Module r m, Monad f) => Module r (Mon f m)
    Monoid m => Module Natural (a -> m)
    Monoid m => Module Natural (a -> m)
    Category k => Module Natural (GEndo k a)
    Category k => Module Natural (GEndo k a)
    Alternative f => Module Natural (Alt f a)
    Alternative f => Module Natural (Alt f a)
    MonadPlus f => Module Natural (MonadSum f a)
    MonadPlus f => Module Natural (MonadSum f a)
    (Module r m, Module r n, Module r o) => Module r ((,,) m n o)
    m) => m => Module Natural (CMonoid m m m)
    Monoid m => Module Natural (CMonoid m m m)
    (Module r m, Module r n, Module r o, Module r p) => Module r ((,,,) m n o p)
    (Module r m, Module r n, Module r o, Module r p, Module r q) => Module r ((,,,,) m n o p q)
    Bits a => Module (Boolean a) (Boolean a)
    (Bounded a, Enum a) => Module (BitSet a) (BitSet a)
    (Ord a, Num a) => Module (Tropical a) (Tropical a)
    (Monoid r, Multiplicative r, Monoid m) => Module r m => Bits a => RightModule Integer (Boolean a) r m) => r m) => ModuleBimoduleshow/hideshow/hideBits a => Bimodule Integer (Boolean a)ModuleNatural ()Bits a => Bimodule Integer (Boolean a)ModuleBits a => Bimodule () (Boolean a)ModuleBits a => BimoduleAll (Boolean a)ModuleEnum a => BimoduleAll (BitSet a)ModuleEnum a => BimoduleAny (BitSet a)Module(Ord a, Num a) => BimoduleAny (Tropical a)Module(Ord a, Num a) => Bimodule ([] a) (Tropical a)ModuleNatural ([] a)(Bimodule r m, Bimodule r n) => Bimodule r ((,) m n)Monoid m => ModuleNatural (Dual m)(Bimodule r m, Bimodule r n, Bimodule r o) => Bimodule r ((,,) m n o)Monoid m => ModuleNatural (Dual m)(Bimodule r m, Bimodule r n, Bimodule r o, Bimodule r p) => Bimodule r ((,,,) m n o p)ModuleNatural (Endo a)(Bimodule r m, Bimodule r n, Bimodule r o, Bimodule r p, Bimodule r q) => Bimodule r ((,,,,) m n o p q)ModuleNatural (EndoBits a => Bimodule (Boolean a) (BooleanNum a => ModuleNatural (Sum(Bounded a, Enum a) => Bimodule (BitSet a) (BitSet(Ord a, a => ModuleNatural (Sum a) => Bimodule (Tropical a) (Tropical
    class Module r m => Bits a => LeftModule Integer (Boolean a)
    Bits a => LeftModule Integer (Boolean a)
    Bits a => LeftModule Natural (Boolean a)
    Bits a => LeftModule Natural (Boolean a)
    (Ord a, Num a) => LeftModule Natural (Tropical a)
    (Ord a, Num a) => LeftModule Natural (Tropical a)
    r, r, Eq a => LeftModule Natural (RLE Seq a)
    Eq a => LeftModule Natural (RLE Seq a)
    Bits a => LeftModule (Boolean a) (Boolean a)
    (Ord a, Num a) => LeftModule (Tropical a) (Tropical a)
    Bits a => RightModule Integer (Boolean a)
    Bits a => RightModule Natural (Boolean a)
    Bits a => RightModule Natural (Boolean a)
    (Ord a, Num a) => RightModule Natural (Tropical a)
    (Ord a, Num a) => RightModule Natural (Tropical a)
    r, r, Eq a => RightModule Natural (RLE Seq a)
    Eq a => RightModule Natural (RLE Seq a)
    Bits a => RightModule (Boolean a) (Boolean a)
    (Ord a, Num a) => RightModule (Tropical a) (Tropical a)
    Module Natural Ordering
    Num a => Module Natural (Product a)
    Num a => Module Natural (Product a)Module Natural (First a)Module Natural (First a)R-Normed Modules +Module Natural (Last a)Module Natural (Last a) r m => Normed r m where
    CharReducer m => class Natural (UTF8 m)Source
    CharReducer m => Module Natural (UTF8 m)
    Module Natural (SourcePosition f)
    Module Natural (SourcePosition f)

    An r-normed module m satisfies: +

    1. mabs m >= 0

    2 mabs m == zero{-_r-} => m == zero{-_m-} +

    3 mabs (m + n) <= mabs m + mabs n +

    4 r * mabs m = mabs (r *. m) -- if m is an r-LeftModule +

    5 mabs m * r = mabs (m .* r) -- if m is an r-RightModule +

    Monoid m => Module Natural (Self m)Monoid m => Module Natural (Self m)MethodsMonoid m => Module Natural (FromString m)
    Monoid m => Module Natural (FromString m)
    Multiplicative m => Module Natural (Log m)mabs :: m -> rSource
    Multiplicative m => Module Natural (Log m)
    Applicative f => Module Natural (Traversal f)
    Applicative f => Module Natural (Traversal f)Monad f => Module Natural (Action f)show/hide InstancesMonad f => Module Natural (Action f)
    Enum a => Module Natural (BitSet a)
    Enum a => Module Natural (BitSet a)(HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => Module r (UnionWith f r)
    (Module r m, Module r n) => Module r ((,) m n)mabs :: Normed r m => m -> rSource
    (Module r m, Applicative f) => Module r (App f m)
    (Module r m, Monad f) => Module r (Mon f m)Monoid m => Module Natural (a -> m)Vector Spaces +Monoid m => Module Natural (a -> m)Eq a => f g) => VectorSpace f g
    class (Field f, Natural (RLE Seq a)Source
    Eq a => Module Natural (RLE Seq a)
    Category k => Module Natural (GEndo k a)Category k => Module Natural (GEndo k a)R-Algebras +Alternative f => Module Natural (Alt f a)Alternative f => Module Natural (Alt f a)
    class (Bimodule r m, Multiplicative m) => Algebra r m Source
    MonadPlus f => Module Natural (MonadSum f a)
    Algebra over a (near) (semi) ring. + r *. (x * y) = (r *. x) * y = x * (r *. y) + (x * y) .* r = y * (x .* r) = (y .* r) * x +MonadPlus f => Module Natural (MonadSum f a)(Module r m, Module r n, Module r o) => Module r ((,,) m n o)show/hide Instances
    Monoid m => Module(Bounded a, Enum a) => Algebra (CMonoid m m m) (BitSet a)Monoid m => Module(Bounded a, Enum a) => Algebra (CMonoid m m m) (BitSet a) a) => Module a) => Algebramonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework.&./.|.. To get a + Boolean Ring, use Boolean (BitSet a). hunk ./doc/html/monoids/Data-Ring-Semi-BitSet.html 174 ->module Data.Ring.Semimodule Data.Ringcomplement :: (Enum a, Bounded a) => BitSet a -> BitSet acomplement :: (Enum a, Bounded a) => BitSet a -> BitSet a
    (Module r m, Module r n, Module r o, Module r p) => Module r ((,,,) m n o p)
    (Module r m, Module r n, Module r o, Module r p, Module r q) => Module r ((,,,,) m n o p q)
    module Data.Ring.Semimodule Data.Ring(Bounded a, Enum a) => Algebra Natural (BitSet a)
    a => Module a => Bimodule(Bounded a, a) => RAlgebra a => Module(Show a, Bounded a, Enum a) => Num (BitSet a)
    (Show a, Bounded a, Enum a) => Bits (BitSet a)
    a) => a) => SemiRing (BitSet a)
    (Bounded a, Enum a) => a) => a) => a) => a) => a) => SemiRing a) => Algebra a) (BitSet a) => Module a) => Bimodule
    (Bounded a, Enum a) => Module (BitSet a) (BitSet a)
    Source
    O(d) Complements a BitSet with respect to the bounds of a. Preserves order of null and size -
    monoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmodule Data.Ring.Semimodule Data.Ring monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmodule Data.Ring.Semimodule Data.RingRightSemiNearRingSemiRingLeftSemiNearRingRightSemiNearRingRingoidLeftSemiNearRingSemiRingRingoidModuleRightModuleModuleRightModuleModuleRightModuleModuleRightModuleRightModuleLeftModuleRightModuleLeftModuleRightModuleLeftModuleRightModuleLeftModuleLeftModuleModuleLeftModuleModuleLeftModuleModuleLeftModuleModuleModule(Bounded a, Enum a) => AlgebraNatural (BitSet a) (Tropical a)Eq a => ModuleMonoid m => RightModule (RLESeq a) (a -> m) k => Module k => RightModule f => Module f => RightModule f => Module f => RightModule m => RightModule m => LeftModuleEq a => RightModuleNatural (RLESeq a)
    monoids-0.1.33: Monoids, specialized containers and a general map/reduce framework
    Bits a => Bimodule Natural (Boolean a)
    Enum a => Bimodule Natural (BitSet a)
    (Ord a, Num a) => Bimodule Natural (Tropical a)
    RightModule m => Module m => RightModuleModuleRightModule a => Module a => RightModule a => Module a => RightModuleModuleRightModuleModuleRightModule m => Module m => RightModuleModuleRightModule m => Module m => RightModule m => Module m => RightModule m => Module m => RightModule f => Module f => RightModule f => Module f => RightModuleModuleRightModuleBits a => RightModule Natural (Boolean a)
    a => Module a => RightModule(Ord a, Num a) => (Tropical a)
    LeftModule Natural m => RightModule m => LeftModuleRightModuleLeftModule a => RightModule a => LeftModule a => RightModule a => LeftModuleRightModuleLeftModuleRightModuleLeftModule m => RightModule m => LeftModuleRightModuleLeftModule m => RightModule m => LeftModule m => RightModule m => LeftModule m => RightModule m => LeftModule f => RightModule f => LeftModule f => RightModule f => LeftModuleRightModuleLeftModuleBits a => LeftModule Natural (Boolean a)
    a => RightModule a => LeftModule(Ord a, Num a) => (Tropical a)
    Module Natural m => LeftModule m => ModuleLeftModuleModule a => LeftModule a => Module a => LeftModule a => ModuleLeftModuleModuleLeftModuleModule m => LeftModule m => ModuleLeftModuleModule m => LeftModule m => Module m => LeftModule m => Module m => LeftModule m => Module f => LeftModule f => Module f => LeftModule f => ModuleLeftModuleModuleEnum a => LeftModuleBits a => Module (BitSet (Boolean(Bounded a, a) => RAlgebra a => ModuleMonoid m => (Ord a, Num a) => (a -> m)
    k => RightModule k => LeftModule f => RightModule f => LeftModule f => RightModule f => LeftModule m => LeftModule m => ModuleEq a => LeftModule Natural (RLE Seq a)
    k => LeftModule k => Module f => LeftModule f => Module f => LeftModule f => Module m => Module m => RightModule m => RightModule m => LeftModule m => LeftModule m => ModulenaturaltoNaturalSource
    monoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmodule Data.Ring.Semi.Nearmodule Data.Ringmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmodule Data.Ring.Semimodule Data.Ringmodule Data.Ring.Semimodule Data.Ring a) => RightSemiNearRing a) => SemiRing a) => LeftSemiNearRing a) => RightSemiNearRing a) => Ringoid a) => LeftSemiNearRing a) => SemiRing a) => Ringoid a => RightSemiNearRing a => SemiRing a => LeftSemiNearRing a => RightSemiNearRing a => Ringoid a => LeftSemiNearRing a => SemiRing a => Ringoidmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmodule Data.Ring.Semimodule Data.Ringmodule Data.Ring.Semimodule Data.Ring(Ord a, Num a) => BimoduleNatural (Tropical a)monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmodule Data.Ring.Semi.Nearmodule Data.Ringmonoids-0.1.35: Monoids, specialized containers and a general map/reduce framework

    Defines left- and right- seminearrings. Every MonadPlus wrapped around + a Monoid qualifies due to the distributivity of (>>=) over mplus. +

    See http://conway.rutgers.edu/~ccshan/wiki/blog/posts/WordNumbers1/ +

    monoids-0.1.33: Monoids, specialized containers and a general map/reduce framework (Index)monoids-0.1.35: Monoids, specialized containers and a general map/reduce framework (Index)monoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkData.Monoid.Multiplicative.Sugar, Data.Ring.Sugar, Data.Group.Multiplicative.SugarData.Monoid.Sugar, Data.Group.Sugar, Data.Monoid.Applicative, Data.Ring.Algebra, Data.Ring.Module.AutomaticDifferentiation, Data.Field.VectorSpace, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiationData.Monoid.Additive.Sugar, Data.Monoid.Multiplicative.Sugar, Data.Ring.Sugar, Data.Group.Sugar, Data.Group.Multiplicative.SugarData.Monoid.Sugar, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Monoid.Applicative, Data.Ring.Algebra, Data.Ring.Module.AutomaticDifferentiation, Data.Field.VectorSpace, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiationData.Group.Multiplicative.SugarData.Group.SugarData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticBimoduleBoolean, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.FreeData.Ring.Semi.BitSetData.Ring.Semi.BitSet, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Ring.Semi.TropicalData.Generator.Compressive.LZ78Data.Ring.Semi.BitSetdeleteData.Set.UnboxedData.Ring.Semi.BitSetdifferenceDivisionRingData.Set.UnboxedData.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.FreeData.Set.UnboxedData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group.Multiplicative, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group.Multiplicative, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Field, Data.Field.VectorSpaceData.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Ring.Semi.Tropical, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Ring.Semi.TropicalfromAscListData.Set.UnboxedData.Ring.Semi.BitSetData.Ring.Semi.BitSetData.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.FreeData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticgetBoolRinggetBoolean, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.FreeData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group.Multiplicative, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.FreeData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group.Multiplicative, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Ring.Semi.TropicalData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.Free, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Ring.Algebra, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Group.Multiplicative, Data.Group.Multiplicative.Sugar, Data.Field, Data.Field.VectorSpaceData.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Ring.Algebra, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Ring.Algebra, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.FreeData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Applicative, Data.Ring.Algebra, Data.Ring.Module.AutomaticDifferentiation, Data.Field.VectorSpace, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiationData.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group.Multiplicative, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group.Multiplicative, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticmapmabsData.Set.UnboxedData.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.FreeData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Monoid.Ord, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Monoid.Ord, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.FreemaxViewData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Monoid.Ord, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Monoid.Ord, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Ring.Algebra, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Applicative, Data.Ring.Algebra, Data.Ring.Module.AutomaticDifferentiation, Data.Field.VectorSpace, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiationData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Monoid.Ord, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Monoid.Ord, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group.Multiplicative, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Group.Multiplicative, Data.Group.Multiplicative.Sugar, Data.Field, Data.Field.VectorSpaceData.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Sugar, Data.Group.Sugar, Data.Group.Multiplicative.SugarnotElemNormedData.Generator.CombinatorsData.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiationnotMembernotElemData.Set.UnboxedData.Generator.CombinatorsData.Set.Unboxed, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Group.Multiplicative, Data.Group.Multiplicative.Sugar, Data.Field, Data.Field.VectorSpaceData.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Generator.Compressive.LZ78Data.Generator.Compressive.RLEData.Generator.Compressive.RLEData.Generator.Compressive.LZ78, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Ring.Semi.TropicalData.Group.Multiplicative.SugarData.Group.Sugar, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.Free, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Ring.Semi.Tropical, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Ord, Data.Ring.Semi.Tropical, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Ord, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Ring.Semi.Tropical, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.Free, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Ring.Semi.Tropical, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Ring.Semi.Tropical, Data.Monoid.Applicative, Data.Ring.Algebra, Data.Ring.Module.AutomaticDifferentiation, Data.Field.VectorSpace, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiationData.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Ring.Algebra, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Set.Unboxed, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Ring.Semi.TropicalsplitData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpaceData.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmetic, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group.Multiplicative, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Set.UnboxedData.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.SugarData.Group.Multiplicative, Data.Group.Multiplicative.Sugar, Data.Field, Data.Field.VectorSpaceData.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Set.Unboxed, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Ord, Data.Ring.Semi.Tropical, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Monoid.Categorical, Data.Generator, Data.Generator.Compressive.RLE, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Monoid.Ord, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.BitSet, Data.Ring.Semi.TropicalUS, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.LZ78, Data.Generator.Compressive.RLE, Data.Generator.Combinators, Data.Generator.Free, Data.Generator.Compressive.RLE, Data.Generator.Compressive.LZ78, Data.Generator.Combinators, Data.Generator.FreeData.Field.VectorSpaceData.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace, Data.Monoid.Multiplicative, Data.Group, Data.Group.Combinators, Data.Ring, Data.Ring.FromNum, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Ring.Module.AutomaticDifferentiation, Data.Ring.Semi.Kleene, Data.Ring.Semi.Near.Trie, Data.Ring.Semi.Natural, Data.Monoid.Sugar, Data.Group.Sugar, Data.Ring.Boolean, Data.Ring.Semi.BitSet, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.ModularArithmeticData.Group.Multiplicative.SugarData.Ring.Semi.BitSetData.Set.UnboxedData.Monoid.Sugar, Data.Group.SugarData.Ring.Semi.BitSetData.Group.Sugarmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.33: Monoids, specialized containers and a general map/reduce frameworkmonoids-0.1.35: Monoids, specialized containers and a general map/reduce frameworkData.Field
    fromNatural :: Ringoid r => Natural -> rmonoids-0.1.33: Monoids, specialized containers and a general map/reduce framework
    (Ord a, Num a) => RightModule Natural (Tropical a)
    (Ord a, Num a) => LeftModule Natural (Tropical a)
    (Ord a, Num a) => Module Natural (Tropical a)
    a) => RightSemiNearRing a) => SemiRing a) => LeftSemiNearRing a) => RightSemiNearRing a) => Ringoid a) => LeftSemiNearRing a) => SemiRing a) => Ringoid
    (Ord a, Num a) => Bimodule (Tropical a) (Tropical a)
    (Ord a, Num a) => RightModule (Tropical a) (Tropical a)
    (Ord a, Num a) => LeftModule (Tropical a) (Tropical a)
    (Ord a, Num a) => Module (Tropical a) (Tropical a)
    module Data.Ring.Semi.Natural
    (^^) :: MultiplicativeGroup r => r -> Integer -> rSource
    monoids-0.1.33: Monoids, specialized containers and a general map/reduce framework
    Synopsis
    module Data.Group
    class (Multiplicative m, Monoid m) => Ringoid m
    class Ringoid m => LeftSemiNearRing m
    class Ringoid m => RightSemiNearRing m
    class (RightSemiNearRing a, LeftSemiNearRing a) => SemiRing a
    class (Group a, SemiRing a) => Ring a
    class (Ring a, MultiplicativeGroup a) => DivisionRing a
    class (Ring a, MultiplicativeGroup a) => Field a
    class (Multiplicative m, Monoid m) => Ringoid m Source
    0 annihilates times +
    show/hide Instances
    Ringoid Int
    Ringoid Integer
    Ringoid Natural
    Monoid m => Ringoid ([] m)
    Monoid m => Ringoid (Maybe m)
    Ringoid m => Ringoid (Dual m)
    Ringoid m => Ringoid (Self m)
    Ringoid m => Ringoid (FromString m)
    Num a => Ringoid (FromNum a)
    Bits a => Ringoid (Boolean a)
    (Bounded a, Enum a) => Ringoid (BitSet a)
    Ord a => Ringoid (Priority a)
    (Bounded a, Ord a) => Ringoid (Order a)
    (Ord a, Num a) => Ringoid (Tropical a)
    (Measured v m, Monoid m) => Ringoid (FingerTree v m)
    Ringoid m => Ringoid (ReducedBy m s)
    (Alternative f, Monoid a) => Ringoid (Alt f a)
    (MonadPlus m, Monoid a) => Ringoid (MonadSum m a)
    (Modular s a, Integral a) => Ringoid (Mod a s)
    (MonadPlus m, Monoid w, Monoid n) => Ringoid (WriterT w m n)
    (MonadPlus m, Monoid w, Monoid n) => Ringoid (WriterT w m n)
    (MonadPlus m, Monoid n) => Ringoid (StateT s m n)
    (MonadPlus m, Monoid n) => Ringoid (StateT s m n)
    (MonadPlus m, Monoid n) => Ringoid (ReaderT e m n)
    (Ringoid r, Bimodule r m) => Ringoid (D s r m)
    (Stream s m t, Monoid a) => Ringoid (ParsecT s u m a)
    (MonadPlus m, Monoid w, Monoid n) => Ringoid (RWST r w s m n)
    (MonadPlus m, Monoid w, Monoid n) => Ringoid (RWST r w s m n)
    class Ringoid m => LeftSemiNearRing m Source
    a * (b + c) = (a * b) + (a * c)
    show/hide Instances
    class Ringoid m => RightSemiNearRing m Source
    (a + b) * c = (a * c) + (b * c)
    show/hide Instances
    class (RightSemiNearRing a, LeftSemiNearRing a) => SemiRing a Source
    A SemiRing is an instance of both Multiplicative and Monoid where + times distributes over plus. +
    show/hide Instances
    a, a, BoolRing
    RingBits a => Ring (Boolean a)
    r, Module r, Bimodule
    class (Ring a, MultiplicativeGroup a) => DivisionRing a Source
    show/hide Instances
    class (Ring a, MultiplicativeGroup a) => Field a Source
    show/hide Instances
    Field f => Field (Dual f)
    Field f => Field (Self f)
    Field f => Field (FromString f)
    Field f => Field (ReducedBy f s)
    .\.Algebra
    BoolRing
    2 (Function)delete
    1 (Function)
    deleteFindMax
    deleteFindMin
    deleteMaxelems
    4 (Function)
    1 (Function)2 (Function)
    findMax
    findMin
    1 (Function)2 (Function)
    1 (Function)
    2 (Function)
    1 (Function)2 (Function)fromNatural
    1 (Function)
    2 (Function)
    1 (Function)
    2 (Function)isProperSubsetOf
    isSubsetOf
    mapMonotonic
    Data.Monoid.Reducer, Data.Monoid.Reducer.Char, Data.Monoid.Lexical.UTF8.Decoder, Data.Monoid.Reducer.With, Data.Monoid.Union, Data.Generator, Data.Monoid.Lexical.SourcePosition, Data.Monoid.Lexical.Words, Data.Monoid.Self, Data.Generator.Compressive.LZ78, Data.Monoid.FromString, Data.Generator.Compressive.RLE, Data.Monoid.Categorical, Data.Monoid.Additive, Data.Monoid.Additive.Sugar, Data.Monoid.Multiplicative, Data.Monoid.Multiplicative.Sugar, Data.Ring.Semi.Near, Data.Ring.Semi, Data.Ring.Semi.Kleene, Data.Ring.Semi.Ord, Data.Ring.Semi.Tropical, Data.Ring.Semi.Near.Trie, Data.Ring.Sugar, Data.Group, Data.Group.Combinators, Data.Group.Multiplicative, Data.Group.Sugar, Data.Group.Multiplicative.Sugar, Data.Ring, Data.Ring.Boolean, Data.Ring.FromNum, Data.Ring.ModularArithmetic, Data.Ring.Module, Data.Monoid.Applicative, Data.Monoid.Monad, Data.Generator.Combinators, Data.Generator.Free, Data.Ring.Semi.Natural, Data.Ring.Algebra, Data.Ring.Semi.BitSet, Data.Ring.Module.AutomaticDifferentiation, Data.Field, Data.Field.VectorSpace
    1 (Function)
    2 (Function)
    minView
    natural
    3 (Function)
    partition
    RAlgebrashowTree
    showTreeWith
    3 (Function)
    1 (Function)
    2 (Function)
    splitMember
    , Data.Group.Multiplicative.Sugar
    toAscList
    1 (Function)2 (Function)toNatural
    3 (Function)unions
    USet
    valid
    1 (Function)2 (Function)^3 (Function)^^
    Data.Field.VectorSpace
    show/hide
    show/hideshow/hide
    show/hideshow/hide
    show/hideshow/hide
    show/hideData.Group.Multiplicative
    Data.Group.Multiplicative.Sugar
    show/hideshow/hide
    show/hide
    Data.Monoid.Additive.Sugar
    show/hideshow/hide
    show/hideshow/hide
    show/hide
    Data.Monoid.Multiplicative.Sugar
    Data.Monoid.Sugar
    show/hideshow/hide
    Data.Ring.Algebra
    show/hideshow/hide
    show/hideData.Ring.Semishow/hideSemi
    show/hideData.Ring.Semi.Nearshow/hideNear
    Data.Ring.Sugar
    show/hideSet
    {-# LANGUAGE UndecidableInstances, TypeOperators, FlexibleContexts, MultiParamTypeClasses, FlexibleInstances, TypeFamilies #-} +
    {-# LANGUAGE UndecidableInstances, TypeOperators, FlexibleContexts, MultiParamTypeClasses, FlexibleInstances, TypeFamilies, CPP #-}
    hunk ./doc/html/monoids/src/Data-Generator.html 47
    -import Data.Array 
    -import Data.Word (Word8)
    -import Data.Text (Text)
    -import Data.Foldable (fold,foldMap)
    -import qualified Data.Text as Text
    -import qualified Data.ByteString as Strict (ByteString, foldl')
    -import qualified Data.ByteString.Char8 as Strict8 (foldl')
    -import qualified Data.ByteString.Lazy as Lazy (ByteString, toChunks)
    -import qualified Data.ByteString.Lazy.Char8 as Lazy8 (toChunks)
    -import qualified Data.Sequence as Seq
    -import Data.FingerTree (Measured, FingerTree)
    -import Data.Sequence (Seq)
    -import qualified Data.Set as Set
    -import Data.Set (Set)
    -import qualified Data.IntSet as IntSet
    -import Data.IntSet (IntSet)
    -import qualified Data.IntMap as IntMap
    -import Data.IntMap (IntMap)
    -import qualified Data.Map as Map
    -import Data.Map (Map)
    -
    -import Control.Parallel.Strategies
    -import Data.Monoid.Reducer
    -
    --- | minimal definition 'mapReduce' or 'mapTo'
    -class Generator c where
    -    type Elem c :: * 
    -    mapReduce :: (e `Reducer` m) => (Elem c -> e) -> c -> m
    -    mapTo     :: (e `Reducer` m) => (Elem c -> e) -> m -> c -> m 
    -    mapFrom   :: (e `Reducer` m) => (Elem c -> e) -> c -> m -> m
    -
    -    mapReduce f = mapTo f mempty
    -    mapTo f m = mappend m . mapReduce f
    -    mapFrom f = mappend . mapReduce f
    -
    -instance Generator Strict.ByteString where
    -    type Elem Strict.ByteString = Word8
    -    mapTo f = Strict.foldl' (\a -> snoc a . f)
    -
    -instance Generator Lazy.ByteString where
    -    type Elem Lazy.ByteString = Word8
    -    mapReduce f = fold . parMap rwhnf (mapReduce f) . Lazy.toChunks
    +#ifdef M_ARRAY
    +import Data.Array 
    +#endif
    +
    +
    +#ifdef M_TEXT
    +import Data.Text (Text)
    +import qualified Data.Text as Text
    +#endif
    +
    +
    +#ifdef M_BYTESTRING
    +import qualified Data.ByteString as Strict (ByteString, foldl')
    +import qualified Data.ByteString.Char8 as Strict8 (foldl')
    +import qualified Data.ByteString.Lazy as Lazy (ByteString, toChunks)
    +import qualified Data.ByteString.Lazy.Char8 as Lazy8 (toChunks)
    +import Data.Word (Word8)
    +#endif
    +
    +#ifdef M_FINGERTREE
    +import Data.FingerTree (Measured, FingerTree)
    +#endif
    +
    +#ifdef M_CONTAINERS
    +import qualified Data.Sequence as Seq
    +import Data.Sequence (Seq)
    +import qualified Data.Set as Set
    +import Data.Set (Set)
    +import qualified Data.IntSet as IntSet
    +import Data.IntSet (IntSet)
    +import qualified Data.IntMap as IntMap
    +import Data.IntMap (IntMap)
    +import qualified Data.Map as Map
    +import Data.Map (Map)
    +#endif
    +
    +#ifdef M_PARALLEL
    +import Control.Parallel.Strategies
    +#endif
    +
    +import Data.Foldable (fold,foldMap)
    +import Data.Monoid.Reducer
    hunk ./doc/html/monoids/src/Data-Generator.html 90
    -instance Generator Text where
    -    type Elem Text = Char
    -    mapTo f = Text.foldl' (\a -> snoc a . f)
    -
    -instance Generator [c] where
    -    type Elem [c] = c
    -    mapReduce f = foldr (cons . f) mempty
    -
    -instance Measured v e => Generator (FingerTree v e) where
    -    type Elem (FingerTree v e) = e
    -    mapReduce f = foldMap (unit . f)
    -
    -instance Generator (Seq c) where
    -    type Elem (Seq c) = c
    -    mapReduce f = foldMap (unit . f)
    +-- | minimal definition 'mapReduce' or 'mapTo'
    +class Generator c where
    +    type Elem c :: * 
    +    mapReduce :: (e `Reducer` m) => (Elem c -> e) -> c -> m
    +    mapTo     :: (e `Reducer` m) => (Elem c -> e) -> m -> c -> m 
    +    mapFrom   :: (e `Reducer` m) => (Elem c -> e) -> c -> m -> m
    +
    +    mapReduce f = mapTo f mempty
    +    mapTo f m = mappend m . mapReduce f
    +    mapFrom f = mappend . mapReduce f
    +
    +#ifdef M_BYTESTRING
    +instance Generator Strict.ByteString where
    +    type Elem Strict.ByteString = Word8
    +    mapTo f = Strict.foldl' (\a -> snoc a . f)
    hunk ./doc/html/monoids/src/Data-Generator.html 106
    -instance Generator IntSet where
    -    type Elem IntSet = Int
    -    mapReduce f = mapReduce f . IntSet.toList
    -
    -instance Generator (Set a) where
    -    type Elem (Set a) = a
    -    mapReduce f = mapReduce f . Set.toList
    -
    -instance Generator (IntMap v) where
    -    type Elem (IntMap v) = (Int,v)
    -    mapReduce f = mapReduce f . IntMap.toList
    -
    -instance Generator (Map k v) where
    -    type Elem (Map k v) = (k,v) 
    -    mapReduce f = mapReduce f . Map.toList
    -
    -instance Ix i => Generator (Array i e) where
    -    type Elem (Array i e) = (i,e)
    -    mapReduce f = mapReduce f . assocs
    -
    --- | a 'Generator' transformer that asks only for the keys of an indexed container
    -newtype Keys c = Keys { getKeys :: c } 
    -
    -instance Generator (Keys (IntMap v)) where
    -    type Elem (Keys (IntMap v)) = Int
    -    mapReduce f = mapReduce f . IntMap.keys . getKeys
    -
    -instance Generator (Keys (Map k v)) where
    -    type Elem (Keys (Map k v)) = k
    -    mapReduce f = mapReduce f . Map.keys . getKeys
    -
    -instance Ix i => Generator (Keys (Array i e)) where
    -    type Elem (Keys (Array i e)) = i
    -    mapReduce f = mapReduce f . range . bounds . getKeys
    -
    --- | a 'Generator' transformer that asks only for the values contained in an indexed container
    -newtype Values c = Values { getValues :: c } 
    +instance Generator Lazy.ByteString where
    +    type Elem Lazy.ByteString = Word8
    +    mapReduce f = fold . parMap rwhnf (mapReduce f) . Lazy.toChunks
    +#endif
    +
    +#ifdef M_TEXT
    +instance Generator Text where
    +    type Elem Text = Char
    +    mapTo f = Text.foldl' (\a -> snoc a . f)
    +#endif
    +
    +instance Generator [c] where
    +    type Elem [c] = c
    +    mapReduce f = foldr (cons . f) mempty
    +
    +#ifdef M_FINGERTREE
    +instance Measured v e => Generator (FingerTree v e) where
    +    type Elem (FingerTree v e) = e
    +    mapReduce f = foldMap (unit . f)
    +#endif
    +
    +#ifdef M_CONTAINERS
    +instance Generator (Seq c) where
    +    type Elem (Seq c) = c
    +    mapReduce f = foldMap (unit . f)
    +
    +instance Generator IntSet where
    +    type Elem IntSet = Int
    +    mapReduce f = mapReduce f . IntSet.toList
    +
    +instance Generator (Set a) where
    +    type Elem (Set a) = a
    +    mapReduce f = mapReduce f . Set.toList
    +
    +instance Generator (IntMap v) where
    +    type Elem (IntMap v) = (Int,v)
    +    mapReduce f = mapReduce f . IntMap.toList
    hunk ./doc/html/monoids/src/Data-Generator.html 144
    -instance Generator (Values (IntMap v)) where
    -    type Elem (Values (IntMap v)) = v
    -    mapReduce f = mapReduce f . IntMap.elems . getValues
    -
    -instance Generator (Values (Map k v)) where
    -    type Elem (Values (Map k v)) = v
    -    mapReduce f = mapReduce f . Map.elems . getValues
    -
    -instance Ix i => Generator (Values (Array i e)) where
    -    type Elem (Values (Array i e)) = e
    -    mapReduce f = mapReduce f . elems . getValues
    -
    --- | a 'Generator' transformer that treats 'Word8' as 'Char'
    --- This lets you use a 'ByteString' as a 'Char' source without going through a 'Monoid' transformer like 'UTF8'
    -newtype Char8 c = Char8 { getChar8 :: c } 
    -
    -instance Generator (Char8 Strict.ByteString) where
    -    type Elem (Char8 Strict.ByteString) = Char
    -    mapTo f m = Strict8.foldl' (\a -> snoc a . f) m . getChar8
    -
    -instance Generator (Char8 Lazy.ByteString) where
    -    type Elem (Char8 Lazy.ByteString) = Char
    -    mapReduce f = fold . parMap rwhnf (mapReduce f . Char8) . Lazy8.toChunks . getChar8
    +instance Generator (Map k v) where
    +    type Elem (Map k v) = (k,v) 
    +    mapReduce f = mapReduce f . Map.toList
    +#endif
    +
    +#ifdef M_ARRAY
    +instance Ix i => Generator (Array i e) where
    +    type Elem (Array i e) = (i,e)
    +    mapReduce f = mapReduce f . assocs
    +#endif
    +
    +-- | a 'Generator' transformer that asks only for the keys of an indexed container
    +newtype Keys c = Keys { getKeys :: c } 
    +
    +#ifdef M_CONTAINERS
    +instance Generator (Keys (IntMap v)) where
    +    type Elem (Keys (IntMap v)) = Int
    +    mapReduce f = mapReduce f . IntMap.keys . getKeys
    +
    +instance Generator (Keys (Map k v)) where
    +    type Elem (Keys (Map k v)) = k
    +    mapReduce f = mapReduce f . Map.keys . getKeys
    +#endif
    hunk ./doc/html/monoids/src/Data-Generator.html 168
    --- | Apply a 'Reducer' directly to the elements of a 'Generator'
    -reduce :: (Generator c, Elem c `Reducer` m) => c -> m
    -reduce = mapReduce id
    -{-# SPECIALIZE reduce :: (Word8 `Reducer` m) => Strict.ByteString -> m #-}
    -{-# SPECIALIZE reduce :: (Word8 `Reducer` m) => Lazy.ByteString -> m #-}
    -{-# SPECIALIZE reduce :: (Char `Reducer` m) => Char8 Strict.ByteString -> m #-}
    -{-# SPECIALIZE reduce :: (Char `Reducer` m) => Char8 Lazy.ByteString -> m #-}
    -{-# SPECIALIZE reduce :: (c `Reducer` m) => [c] -> m #-}
    -{-# SPECIALIZE reduce :: (Generator (FingerTree v e), e `Reducer` m) => FingerTree v e -> m #-}
    -{-# SPECIALIZE reduce :: (Char `Reducer` m) => Text -> m #-}
    -{-# SPECIALIZE reduce :: (e `Reducer` m) => Seq e -> m #-}
    -{-# SPECIALIZE reduce :: (Int `Reducer` m) => IntSet -> m #-}
    -{-# SPECIALIZE reduce :: (a `Reducer` m) => Set a -> m #-}
    -{-# SPECIALIZE reduce :: ((Int,v) `Reducer` m) => IntMap v -> m #-}
    -{-# SPECIALIZE reduce :: ((k,v) `Reducer` m) => Map k v -> m #-}
    -{-# SPECIALIZE reduce :: (Int `Reducer` m) => Keys (IntMap v) -> m #-}
    -{-# SPECIALIZE reduce :: (k `Reducer` m) => Keys (Map k v) -> m #-}
    -{-# SPECIALIZE reduce :: (v `Reducer` m) => Values (IntMap v) -> m #-}
    -{-# SPECIALIZE reduce :: (v `Reducer` m) => Values (Map k v) -> m #-}
    -
    -mapReduceWith :: (Generator c, e `Reducer` m) => (m -> n) -> (Elem c -> e) -> c -> n
    -mapReduceWith f g = f . mapReduce g
    -{-# INLINE mapReduceWith #-}
    -
    -reduceWith :: (Generator c, Elem c `Reducer` m) => (m -> n) -> c -> n
    -reduceWith f = f . reduce
    -{-# INLINE reduceWith #-}
    +#ifdef M_ARRAY
    +instance Ix i => Generator (Keys (Array i e)) where
    +    type Elem (Keys (Array i e)) = i
    +    mapReduce f = mapReduce f . range . bounds . getKeys
    +#endif
    +
    +-- | a 'Generator' transformer that asks only for the values contained in an indexed container
    +newtype Values c = Values { getValues :: c } 
    +
    +#ifdef M_CONTAINERS
    +instance Generator (Values (IntMap v)) where
    +    type Elem (Values (IntMap v)) = v
    +    mapReduce f = mapReduce f . IntMap.elems . getValues
    +
    +instance Generator (Values (Map k v)) where
    +    type Elem (Values (Map k v)) = v
    +    mapReduce f = mapReduce f . Map.elems . getValues
    +#endif
    +
    +#ifdef M_ARRAY
    +instance Ix i => Generator (Values (Array i e)) where
    +    type Elem (Values (Array i e)) = e
    +    mapReduce f = mapReduce f . elems . getValues
    +#endif
    +
    +-- | a 'Generator' transformer that treats 'Word8' as 'Char'
    +-- This lets you use a 'ByteString' as a 'Char' source without going through a 'Monoid' transformer like 'UTF8'
    +newtype Char8 c = Char8 { getChar8 :: c } 
    +
    +#ifdef M_BYTESTRING
    +instance Generator (Char8 Strict.ByteString) where
    +    type Elem (Char8 Strict.ByteString) = Char
    +    mapTo f m = Strict8.foldl' (\a -> snoc a . f) m . getChar8
    +
    +instance Generator (Char8 Lazy.ByteString) where
    +    type Elem (Char8 Lazy.ByteString) = Char
    +    mapReduce f = fold . parMap rwhnf (mapReduce f . Char8) . Lazy8.toChunks . getChar8
    +#endif
    +
    +-- | Apply a 'Reducer' directly to the elements of a 'Generator'
    +reduce :: (Generator c, Elem c `Reducer` m) => c -> m
    +reduce = mapReduce id
    +#ifdef M_BYTESTRING
    +{-# SPECIALIZE reduce :: (Word8 `Reducer` m) => Strict.ByteString -> m #-}
    +{-# SPECIALIZE reduce :: (Word8 `Reducer` m) => Lazy.ByteString -> m #-}
    +{-# SPECIALIZE reduce :: (Char `Reducer` m) => Char8 Strict.ByteString -> m #-}
    +{-# SPECIALIZE reduce :: (Char `Reducer` m) => Char8 Lazy.ByteString -> m #-}
    +#endif
    +{-# SPECIALIZE reduce :: (c `Reducer` m) => [c] -> m #-}
    +#ifdef M_FINGERTREE
    +{-# SPECIALIZE reduce :: (Generator (FingerTree v e), e `Reducer` m) => FingerTree v e -> m #-}
    +#endif
    +#ifdef M_TEXT
    +{-# SPECIALIZE reduce :: (Char `Reducer` m) => Text -> m #-}
    +#endif
    +#ifdef M_CONTAINERS
    +{-# SPECIALIZE reduce :: (e `Reducer` m) => Seq e -> m #-}
    +{-# SPECIALIZE reduce :: (Int `Reducer` m) => IntSet -> m #-}
    +{-# SPECIALIZE reduce :: (a `Reducer` m) => Set a -> m #-}
    +{-# SPECIALIZE reduce :: ((Int,v) `Reducer` m) => IntMap v -> m #-}
    +{-# SPECIALIZE reduce :: ((k,v) `Reducer` m) => Map k v -> m #-}
    +{-# SPECIALIZE reduce :: (Int `Reducer` m) => Keys (IntMap v) -> m #-}
    +{-# SPECIALIZE reduce :: (k `Reducer` m) => Keys (Map k v) -> m #-}
    +{-# SPECIALIZE reduce :: (v `Reducer` m) => Values (IntMap v) -> m #-}
    +{-# SPECIALIZE reduce :: (v `Reducer` m) => Values (Map k v) -> m #-}
    +#endif
    +
    +mapReduceWith :: (Generator c, e `Reducer` m) => (m -> n) -> (Elem c -> e) -> c -> n
    +mapReduceWith f g = f . mapReduce g
    +{-# INLINE mapReduceWith #-}
    +
    +reduceWith :: (Generator c, Elem c `Reducer` m) => (m -> n) -> c -> n
    +reduceWith f = f . reduce
    +{-# INLINE reduceWith #-}
    hunk ./doc/html/monoids/src/Data-Group-Sugar.html 20
    --- > import Prelude hiding ((-), (+), negate, subtract)
    +-- > import Prelude hiding ((-), (+), (*), (/), (^), (^^), negate, subtract, recip)
    hunk ./doc/html/monoids/src/Data-Group-Sugar.html 26
    -    ( module Data.Monoid.Additive.Sugar
    +    ( module Data.Monoid.Sugar
    hunk ./doc/html/monoids/src/Data-Group-Sugar.html 31
    -    ) where
    -
    -import Data.Monoid.Additive.Sugar
    -import Data.Group
    -import Prelude hiding ((-), negate, subtract)
    +    , (/)
    +    , (.\.)
    +    , (^^)
    +    , recip
    +    ) where
    hunk ./doc/html/monoids/src/Data-Group-Sugar.html 37
    -infixl 7 -
    -
    -(-) :: Group g => g -> g -> g
    -(-) = minus
    +import Data.Monoid.Sugar
    +import Data.Group.Combinators as Group
    +import Data.Group
    +import Prelude hiding ((-), (+), (*), (/), (^^), negate, subtract, recip)
    hunk ./doc/html/monoids/src/Data-Group-Sugar.html 42
    -negate :: Group g => g -> g
    -negate = gnegate
    -
    -subtract :: Group g => g -> g -> g
    -subtract = gsubtract
    +infixl 8 /
    +infixr 8 .\.
    +infixl 7 -
    +
    +(-) :: Group g => g -> g -> g
    +(-) = minus
    +
    +negate :: Group g => g -> g
    +negate = gnegate
    +
    +subtract :: Group g => g -> g -> g
    +subtract = gsubtract
    +
    +(/) :: MultiplicativeGroup g => g -> g -> g
    +(/) = over
    +
    +(.\.) :: MultiplicativeGroup g => g -> g -> g
    +(.\.) = under
    +
    +recip :: MultiplicativeGroup g => g -> g
    +recip = grecip
    +
    +(^^) :: MultiplicativeGroup g => g -> Integer -> g
    +g ^^ n = getLog (Group.replicate (Log g) n)
    hunk ./doc/html/monoids/src/Data-Group.html 23
    -    ( module Data.Monoid.Additive
    +    ( module Data.Monoid.Multiplicative
    hunk ./doc/html/monoids/src/Data-Group.html 28
    -    ) where
    -
    -import Data.Monoid.Additive
    -import Data.Monoid.Self
    -import Data.Monoid.FromString
    -import Data.Monoid.Reducer
    -
    -infixl 6 `minus`
    +    , MultiplicativeGroup
    +    , over
    +    , under
    +    , grecip
    +    ) where
    +
    +import Data.Monoid.Multiplicative
    +import Data.Monoid.Self
    hunk ./doc/html/monoids/src/Data-Group.html 37
    --- | Minimal complete definition: 'gnegate' or 'minus'
    -class Monoid a => Group a where
    -    -- additive inverse
    -    gnegate :: a -> a
    -    minus :: a -> a -> a
    -    gsubtract :: a -> a -> a 
    -
    -    gnegate = minus zero
    -    a `minus` b = a `plus` gnegate b 
    -    a `gsubtract` b = gnegate a `plus` b
    -
    -instance Num a => Group (Sum a) where
    -    gnegate = Sum . negate . getSum
    -    Sum a `minus` Sum b = Sum (a - b)
    -    
    -instance Fractional a => Group (Product a) where
    -    gnegate = Product . negate . getProduct
    -    Product a `minus` Product b = Product (a / b)
    -    
    -instance Group a => Group (Dual a) where
    -    gnegate = Dual . gnegate . getDual
    -
    -instance Group a => Group (Self a) where
    -    gnegate = Self . gnegate . getSelf
    -    Self a `minus` Self b = Self (a `minus` b)
    -
    -instance Group a => Group (FromString a) where
    -    gnegate = FromString . gnegate . getFromString
    -    FromString a `minus` FromString b = FromString (a `minus` b)
    -
    -instance Group a => Group (ReducedBy a s) where
    -    gnegate = Reduction . gnegate . getReduction
    -    Reduction a `minus` Reduction b = Reduction (a `minus` b)
    -
    +#ifdef X_OverloadedStrings
    +import Data.Monoid.FromString
    +#endif
    +
    +infixl 6 `minus`
    +
    +-- | Minimal complete definition: 'gnegate' or 'minus'
    +class Monoid a => Group a where
    +    -- additive inverse
    +    gnegate :: a -> a
    +    minus :: a -> a -> a
    +    gsubtract :: a -> a -> a 
    +
    +    gnegate = minus zero
    +    a `minus` b = a `plus` gnegate b 
    +    a `gsubtract` b = gnegate a `plus` b
    +
    +instance Num a => Group (Sum a) where
    +    gnegate = Sum . negate . getSum
    +    Sum a `minus` Sum b = Sum (a - b)
    +    
    +instance Fractional a => Group (Product a) where
    +    gnegate = Product . negate . getProduct
    +    Product a `minus` Product b = Product (a / b)
    +    
    +instance Group a => Group (Dual a) where
    +    gnegate = Dual . gnegate . getDual
    +
    +instance Group a => Group (Self a) where
    +    gnegate = Self . gnegate . getSelf
    +    Self a `minus` Self b = Self (a `minus` b)
    +
    +-- | Minimal definition over or grecip
    +class Multiplicative g => MultiplicativeGroup g where
    +    -- | @x / y@
    +    over :: g -> g -> g
    +    -- | @x \ y@
    +    under :: g -> g -> g
    +    grecip :: g -> g
    +
    +    x `under` y = grecip x `times` y
    +    x `over` y = x `times` grecip y
    +    grecip x = one `over` x
    +
    +instance MultiplicativeGroup g => Group (Log g) where
    +    Log x `minus` Log y = Log (x `over` y)
    +    Log x `gsubtract` Log y = Log (x `under` y)
    +    gnegate (Log x) = Log (grecip x)
    +
    +instance Group g => MultiplicativeGroup (Exp g) where
    +    Exp x `over` Exp y = Exp (x `minus` y)
    +    Exp x `under` Exp y = Exp (x `gsubtract` y)
    +    grecip (Exp x) = Exp (gnegate x)
    +
    +instance MultiplicativeGroup g => MultiplicativeGroup (Self g) where
    +    Self x `over` Self y = Self (x `over` y)
    +    Self x `under` Self y = Self (x `under` y)
    +    grecip (Self x) = Self (grecip x)
    +
    +#ifdef M_REFLECTION
    +instance MultiplicativeGroup g => MultiplicativeGroup (ReducedBy g s) where
    +    Reduction x `over` Reduction y = Reduction (x `over` y)
    +    Reduction x `under` Reduction y = Reduction (x `under` y)
    +    grecip (Reduction x) = Reduction (grecip x)
    +
    +instance Group a => Group (ReducedBy a s) where
    +    gnegate = Reduction . gnegate . getReduction
    +    Reduction a `minus` Reduction b = Reduction (a `minus` b)
    +    Reduction a `gsubtract` Reduction b = Reduction (a `gsubtract` b)
    +#endif
    +
    +instance MultiplicativeGroup a => MultiplicativeGroup (Dual a) where
    +    grecip = Dual . grecip . getDual
    +
    +#ifdef X_OverloadedStrings
    +instance MultiplicativeGroup g => MultiplicativeGroup (FromString g) where
    +    FromString x `over` FromString y = FromString (x `over` y)
    +    FromString x `under` FromString y = FromString (x `under` y)
    +    grecip (FromString x) = FromString (grecip x)
    +
    +instance Group a => Group (FromString a) where
    +    gnegate = FromString . gnegate . getFromString
    +    FromString a `minus` FromString b = FromString (a `minus` b)
    +    FromString a `gsubtract` FromString b = FromString (a `gsubtract` b)
    +#endif
    +
    hunk ./doc/html/monoids/src/Data-Monoid-Applicative.html 26
    -    , module Data.Ring.Semi.Near
    -    , module Data.Ring.Module
    -    , Traversal(Traversal,getTraversal)
    -    , Alt(Alt,getAlt)
    -    , App(App,getApp)
    -    , snocTraversal
    -    ) where
    -
    -import Control.Applicative
    -import Data.Monoid.Reducer
    -import Data.Ring.Semi.Near
    -import Data.Ring.Module
    -import Control.Functor.Pointed
    -
    --- | A 'Traversal' uses an glues together 'Applicative' actions with (*>)
    ---   in the manner of 'traverse_' from "Data.Foldable". Any values returned by 
    ---   reduced actions are discarded.
    -newtype Traversal f = Traversal { getTraversal :: f () } 
    -
    -instance Applicative f => Monoid (Traversal f) where
    -    mempty = Traversal (pure ())
    -    Traversal a `mappend` Traversal b = Traversal (a *> b)
    -
    -instance Applicative f => Reducer (f a) (Traversal f) where
    -    unit a = Traversal (a *> pure ())
    -    a `cons` Traversal b = Traversal (a *> b)
    -    Traversal a `snoc` b = Traversal (a *> b *> pure ())
    -
    -
    --- | Efficiently avoid needlessly rebinding when using 'snoc' on an action that already returns ()
    ---   A rewrite rule automatically applies this when possible
    -snocTraversal :: Reducer (f ()) (Traversal f) => Traversal f -> f () -> Traversal f
    -snocTraversal a = mappend a . Traversal
    -{-# RULES "unitTraversal" unit = Traversal #-}
    -{-# RULES "snocTraversal" snoc = snocTraversal #-}
    -
    --- | A 'Alt' turns any 'Alternative' instance into a 'Monoid'.
    ---   It also provides a 'Multiplicative' instance for an 'Applicative' functor wrapped around a 'Monoid'
    ---   and asserts that any 'Alternative' applied to a 'Monoid' forms a 'RightSemiNearRing' 
    ---   under these operations.
    -
    -newtype Alt f a = Alt { getAlt :: f a } 
    -    deriving (Eq,Ord,Show,Read,Functor,Applicative,Alternative,Copointed)
    -
    -instance Alternative f => Monoid (Alt f a) where
    -    mempty = empty 
    -    Alt a `mappend` Alt b = Alt (a <|> b) 
    -
    -instance (Applicative f, Monoid a) => Multiplicative (Alt f a) where
    -    one = pure mempty
    -    times = liftA2 mappend
    -
    -instance Applicative f => Pointed (Alt f) where
    -    point = pure
    -
    -instance Alternative f => Reducer (f a) (Alt f a) where
    -    unit = Alt 
    +    , module Data.Ring.Module
    +    , Traversal(Traversal,getTraversal)
    +    , Alt(Alt,getAlt)
    +    , App(App,getApp)
    +    , snocTraversal
    +    ) where
    +
    +import Control.Applicative
    +import Data.Monoid.Reducer
    +import Data.Ring.Module
    +import Control.Functor.Pointed
    +
    +-- | A 'Traversal' uses an glues together 'Applicative' actions with (*>)
    +--   in the manner of 'traverse_' from "Data.Foldable". Any values returned by 
    +--   reduced actions are discarded.
    +newtype Traversal f = Traversal { getTraversal :: f () } 
    +
    +instance Applicative f => Monoid (Traversal f) where
    +    mempty = Traversal (pure ())
    +    Traversal a `mappend` Traversal b = Traversal (a *> b)
    +
    +instance Applicative f => Reducer (f a) (Traversal f) where
    +    unit a = Traversal (a *> pure ())
    +    a `cons` Traversal b = Traversal (a *> b)
    +    Traversal a `snoc` b = Traversal (a *> b *> pure ())
    +
    +
    +-- | Efficiently avoid needlessly rebinding when using 'snoc' on an action that already returns ()
    +--   A rewrite rule automatically applies this when possible
    +snocTraversal :: Reducer (f ()) (Traversal f) => Traversal f -> f () -> Traversal f
    +snocTraversal a = mappend a . Traversal
    +{-# RULES "unitTraversal" unit = Traversal #-}
    +{-# RULES "snocTraversal" snoc = snocTraversal #-}
    +
    +-- | A 'Alt' turns any 'Alternative' instance into a 'Monoid'.
    +--   It also provides a 'Multiplicative' instance for an 'Applicative' functor wrapped around a 'Monoid'
    +--   and asserts that any 'Alternative' applied to a 'Monoid' forms a 'RightSemiNearRing' 
    +--   under these operations.
    +
    +newtype Alt f a = Alt { getAlt :: f a } 
    +    deriving (Eq,Ord,Show,Read,Functor,Applicative,Alternative,Copointed)
    +
    +instance Alternative f => Monoid (Alt f a) where
    +    mempty = empty 
    +    Alt a `mappend` Alt b = Alt (a <|> b) 
    +
    +instance (Applicative f, Monoid a) => Multiplicative (Alt f a) where
    +    one = pure mempty
    +    times = liftA2 mappend
    +
    +instance Applicative f => Pointed (Alt f) where
    +    point = pure
    +
    +instance Alternative f => Reducer (f a) (Alt f a) where
    +    unit = Alt 
    +
    +instance (Alternative f, Monoid a) => Ringoid (Alt f a)
    hunk ./doc/html/monoids/src/Data-Monoid-Applicative.html 84
    -instance (Alternative f, Monoid a) => Ringoid (Alt f a)
    +instance (Alternative f, Monoid a) => RightSemiNearRing (Alt f a)
    hunk ./doc/html/monoids/src/Data-Monoid-Applicative.html 86
    -instance (Alternative f, Monoid a) => RightSemiNearRing (Alt f a)
    +-- | if @m@ is a 'Module' over @r@ and @f@ is a 'Applicative' then @f `App` m@ is a 'Module' over @r@ as well
    hunk ./doc/html/monoids/src/Data-Monoid-Applicative.html 88
    --- | if @m@ is a 'Module' over @r@ and @f@ is a 'Applicative' then @f `App` m@ is a 'Module' over @r@ as well
    -
    -newtype App f m = App { getApp :: f m } 
    -    deriving (Eq,Ord,Show,Read,Functor,Pointed,Applicative,Alternative,Copointed)
    -
    -instance (Monoid m, Applicative f) => Monoid (f `App` m) where
    -    mempty = pure mempty
    -    mappend = liftA2 mappend
    -
    -instance (Group m, Applicative f) => Group (f `App` m) where
    -    gnegate = fmap gnegate
    -    minus = liftA2 minus
    -    gsubtract = liftA2 gsubtract
    -
    -instance (c `Reducer` m, Applicative f) => Reducer c (f `App` m) where
    -    unit = pure . unit
    -
    -instance (LeftModule r m, Applicative f) => LeftModule r (f `App` m) where x *. m = (x *.) <$> m
    -instance (RightModule r m, Applicative f) => RightModule r (f `App` m) where m .* y = (.* y) <$> m
    -instance (Module r m, Applicative f) => Module r (f `App` m)
    +newtype App f m = App { getApp :: f m } 
    +    deriving (Eq,Ord,Show,Read,Functor,Applicative,Alternative,Pointed,Copointed)
    +
    +instance (Monoid m, Applicative f) => Monoid (f `App` m) where
    +    mempty = pure mempty
    +    mappend = liftA2 mappend
    +
    +instance (Group m, Applicative f) => Group (f `App` m) where
    +    gnegate = fmap gnegate
    +    minus = liftA2 minus
    +    gsubtract = liftA2 gsubtract
    +
    +instance (c `Reducer` m, Applicative f) => Reducer c (f `App` m) where
    +    unit = pure . unit
    +
    +instance (LeftModule r m, Applicative f) => LeftModule r (f `App` m) where x *. m = (x *.) <$> m
    +instance (RightModule r m, Applicative f) => RightModule r (f `App` m) where m .* y = (.* y) <$> m
    +instance (Module r m, Applicative f) => Module r (f `App` m)
    hunk ./doc/html/monoids/src/Data-Monoid-Combinators.html 9
    -
    {-# LANGUAGE UndecidableInstances, TypeOperators, FlexibleContexts, MultiParamTypeClasses, FlexibleInstances, TypeFamilies #-}
    +
    {-# LANGUAGE UndecidableInstances, TypeOperators, FlexibleContexts, MultiParamTypeClasses, FlexibleInstances, TypeFamilies, CPP #-}
    hunk ./doc/html/monoids/src/Data-Monoid-Combinators.html 33
    -    -- * QuickCheck Properties
    -    , prop_replicate_right_distributive
    -    ) where
    -
    -import Prelude hiding (replicate, cycle, repeat)
    -import Data.Monoid.Reducer
    -import Test.QuickCheck
    -
    +#ifdef M_QUICKCHECK
    +    -- * QuickCheck Properties
    +    , prop_replicate_right_distributive
    +#endif
    +    ) where
    +
    +import Prelude hiding (replicate, cycle, repeat)
    +import Data.Monoid.Reducer
    hunk ./doc/html/monoids/src/Data-Monoid-Combinators.html 42
    --- | A generalization of 'Data.List.cycle' to an arbitrary 'Monoid'. May fail to terminate for some values in some monoids.
    -cycle :: Monoid m => m -> m
    -cycle xs = xs' where xs' = xs `mappend` xs'
    +#ifdef M_QUICKCHECK 
    +import Test.QuickCheck
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Combinators.html 46
    --- | A generalization of 'Data.List.repeat' to an arbitrary 'Monoid'. May fail to terminate for some values in some monoids.
    -repeat :: (e `Reducer` m) => e -> m 
    -repeat x = xs where xs = cons x xs 
    +-- | A generalization of 'Data.List.cycle' to an arbitrary 'Monoid'. May fail to terminate for some values in some monoids.
    +cycle :: Monoid m => m -> m
    +cycle xs = xs' where xs' = xs `mappend` xs'
    hunk ./doc/html/monoids/src/Data-Monoid-Combinators.html 50
    --- | A generalization of 'Data.List.replicate' to an arbitrary 'Monoid'. Adapted from 
    --- <http://augustss.blogspot.com/2008/07/lost-and-found-if-i-write-108-in.html>
    -replicate :: (Monoid m, Integral n) => m -> n -> m
    -replicate x0 y0 
    -    | y0 < 0 = mempty -- error "negative length"
    -    | y0 == 0 = mempty
    -    | otherwise = f x0 y0
    -    where
    -        f x y 
    -            | even y = f (x `mappend` x) (y `quot` 2)
    -            | y == 1 = x
    -            | otherwise = g (x `mappend` x) ((y - 1) `quot` 2) x
    -        g x y z 
    -            | even y = g (x `mappend` x) (y `quot` 2) z
    -            | y == 1 = x `mappend` z
    -            | otherwise = g (x `mappend` x) ((y - 1) `quot` 2) (x `mappend` z)
    -{-# INLINE replicate #-}
    -
    -prop_replicate_right_distributive :: (Eq m, Monoid m, Arbitrary m, Integral n) => m -> n -> n -> Bool
    -prop_replicate_right_distributive m x y
    -    = replicate m (x + y) == replicate m x `mappend` replicate m y
    +-- | A generalization of 'Data.List.repeat' to an arbitrary 'Monoid'. May fail to terminate for some values in some monoids.
    +repeat :: (e `Reducer` m) => e -> m 
    +repeat x = xs where xs = cons x xs 
    +
    +-- | A generalization of 'Data.List.replicate' to an arbitrary 'Monoid'. Adapted from 
    +-- <http://augustss.blogspot.com/2008/07/lost-and-found-if-i-write-108-in.html>
    +replicate :: (Monoid m, Integral n) => m -> n -> m
    +replicate x0 y0 
    +    | y0 < 0 = error "Data.Monoid.Combinators.replicate: negative length"
    +    | y0 == 0 = mempty
    +    | otherwise = f x0 y0
    +    where
    +        f x y 
    +            | even y = f (x `mappend` x) (y `quot` 2)
    +            | y == 1 = x
    +            | otherwise = g (x `mappend` x) ((y - 1) `quot` 2) x
    +        g x y z 
    +            | even y = g (x `mappend` x) (y `quot` 2) z
    +            | y == 1 = x `mappend` z
    +            | otherwise = g (x `mappend` x) ((y - 1) `quot` 2) (x `mappend` z)
    +{-# INLINE replicate #-}
    +
    +#ifdef M_QUICKCHECK
    +prop_replicate_right_distributive :: (Eq m, Monoid m, Arbitrary m, Integral n) => m -> n -> n -> Bool
    +prop_replicate_right_distributive m x y
    +    = replicate m (x + y) == replicate m x `mappend` replicate m y
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-FromString.html 13
    --- Module      :  Data.Monoid.Additive
    +-- Module      :  Data.Monoid.FromString
    hunk ./doc/html/monoids/src/Data-Monoid-FromString.html 34
    -import GHC.Exts
    +import Data.String
    hunk ./doc/html/monoids/src/Data-Monoid-Instances.html 9
    -
    {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, UndecidableInstances, OverloadedStrings #-}
    +
    {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, UndecidableInstances, OverloadedStrings, CPP #-}
    hunk ./doc/html/monoids/src/Data-Monoid-Instances.html 38
    --- This module is automatically included everywhere this functionality is required
    --- within this package. You should only have to import this module yourself if you 
    --- want these instances for your own purposes.
    ------------------------------------------------------------------------------
    -
    -module Data.Monoid.Instances where
    +-- * 'Num' and 'Bits' instances for 'Bool' as a 'Boolean' `&&`/`||` 'SemiRing'
    +--
    +-- This module is automatically included everywhere this functionality is required
    +-- within this package. You should only have to import this module yourself if you 
    +-- want these instances for your own purposes.
    +-----------------------------------------------------------------------------
    hunk ./doc/html/monoids/src/Data-Monoid-Instances.html 45
    -import Control.Monad.Reader
    +module Data.Monoid.Instances () where
    hunk ./doc/html/monoids/src/Data-Monoid-Instances.html 47
    -import qualified Control.Monad.RWS.Lazy as LRWS
    -import qualified Control.Monad.RWS.Strict as SRWS
    -
    -import qualified Control.Monad.State.Lazy as LState
    -import qualified Control.Monad.State.Strict as SState
    -
    +#ifdef M_MTL
    +import Control.Monad.Reader
    +import qualified Control.Monad.RWS.Lazy as LRWS
    +import qualified Control.Monad.RWS.Strict as SRWS
    +import qualified Control.Monad.State.Lazy as LState
    +import qualified Control.Monad.State.Strict as SState
    hunk ./doc/html/monoids/src/Data-Monoid-Instances.html 55
    -
    -import Data.String
    -
    -import Data.Ratio
    -
    -import Data.FingerTree
    -
    -import Text.Parsec.Prim
    +#endif
    +
    +#ifdef X_OverloadedStrings
    +import Data.String
    +#endif
    +
    +import Data.Bits
    +import Data.Ratio
    hunk ./doc/html/monoids/src/Data-Monoid-Instances.html 64
    --- orphan Monoid instances for Monad Transformers
    -instance (MonadPlus m, Monoid w) => Monoid (SWriter.WriterT w m n) where
    -    mempty = mzero
    -    mappend = mplus
    -
    -instance (MonadPlus m, Monoid w) => Monoid (WriterT w m n) where
    -    mempty = mzero
    -    mappend = mplus
    -
    -instance (MonadPlus m, Monoid w) => Monoid (SRWS.RWST r w s m n) where 
    +#ifdef M_FINGERTREE
    +import Data.FingerTree
    +#endif
    +
    +#ifdef M_PARSEC
    +import Text.Parsec.Prim
    +#endif
    +
    +#ifdef M_MTL
    +instance (MonadPlus m, Monoid w) => Monoid (SWriter.WriterT w m n) where
    hunk ./doc/html/monoids/src/Data-Monoid-Instances.html 77
    -instance (MonadPlus m, Monoid w) => Monoid (LRWS.RWST r w s m n) where 
    +instance (MonadPlus m, Monoid w) => Monoid (WriterT w m n) where
    hunk ./doc/html/monoids/src/Data-Monoid-Instances.html 81
    -instance MonadPlus m => Monoid (ReaderT e m n) where
    +instance (MonadPlus m, Monoid w) => Monoid (SRWS.RWST r w s m n) where 
    hunk ./doc/html/monoids/src/Data-Monoid-Instances.html 85
    -instance MonadPlus m => Monoid (SState.StateT s m n) where
    +instance (MonadPlus m, Monoid w) => Monoid (LRWS.RWST r w s m n) where 
    hunk ./doc/html/monoids/src/Data-Monoid-Instances.html 89
    -instance MonadPlus m => Monoid (LState.StateT s m n) where
    +instance MonadPlus m => Monoid (ReaderT e m n) where
    hunk ./doc/html/monoids/src/Data-Monoid-Instances.html 93
    --- orphan, which should be in Data.FingerTree
    -instance Measured v a => Monoid (FingerTree v a) where
    -    mempty = empty
    -    mappend = (><)
    -
    --- orphan, which should be in Parsec
    -instance Stream s m t => Monoid (ParsecT s u m a) where
    -    mempty = mzero
    -    a `mappend` b = try a <|> b
    -
    --- orphan, perhaps should be in Data.String
    -instance (IsString a, IsString b) => IsString (a,b) where
    -    fromString a = (fromString a, fromString a)
    -
    -instance (IsString a, IsString b, IsString c) => IsString (a,b,c) where
    -    fromString a = (fromString a, fromString a, fromString a)
    -
    -instance (IsString a, IsString b, IsString c, IsString d) => IsString (a,b,c,d) where
    -    fromString a = (fromString a, fromString a, fromString a, fromString a)
    -
    -instance (IsString a, IsString b, IsString c, IsString d, IsString e) => IsString (a,b,c,d,e) where
    -    fromString a = (fromString a, fromString a, fromString a, fromString a, fromString a)
    -
    -instance Monoid Int where
    -    mempty = 0
    -    mappend = (+)
    -
    -instance Monoid Integer where
    -    mempty = 0
    -    mappend = (+)
    +instance MonadPlus m => Monoid (SState.StateT s m n) where
    +    mempty = mzero
    +    mappend = mplus
    +
    +instance MonadPlus m => Monoid (LState.StateT s m n) where
    +    mempty = mzero
    +    mappend = mplus
    +#endif
    +
    +#ifdef M_FINGERTREE
    +instance Measured v a => Monoid (FingerTree v a) where
    +    mempty = empty
    +    mappend = (><)
    +#endif
    +
    +#ifdef M_PARSEC
    +instance Stream s m t => Monoid (ParsecT s u m a) where
    +    mempty = mzero
    +    a `mappend` b = try a <|> b
    +#endif
    +
    +#ifdef X_OverloadedStrings
    +instance (IsString a, IsString b) => IsString (a,b) where
    +    fromString a = (fromString a, fromString a)
    +
    +instance (IsString a, IsString b, IsString c) => IsString (a,b,c) where
    +    fromString a = (fromString a, fromString a, fromString a)
    +
    +instance (IsString a, IsString b, IsString c, IsString d) => IsString (a,b,c,d) where
    +    fromString a = (fromString a, fromString a, fromString a, fromString a)
    hunk ./doc/html/monoids/src/Data-Monoid-Instances.html 124
    -instance Integral m => Monoid (Ratio m) where
    -    mempty = 0
    -    mappend = (+)
    +instance (IsString a, IsString b, IsString c, IsString d, IsString e) => IsString (a,b,c,d,e) where
    +    fromString a = (fromString a, fromString a, fromString a, fromString a, fromString a)
    +#endif
    +
    +instance Monoid Int where
    +    mempty = 0
    +    mappend = (+)
    +
    +instance Monoid Integer where
    +    mempty = 0
    +    mappend = (+)
    +
    +instance Integral m => Monoid (Ratio m) where
    +    mempty = 0
    +    mappend = (+)
    +
    +instance Monoid Bool where
    +    mempty = 0
    +    mappend = (||)
    +
    +-- boolean semiring
    +instance Num Bool where
    +    (+) = (||)
    +    (*) = (&&)
    +    x - y = x && not y
    +    negate = not
    +    abs = id
    +    signum = id
    +    fromInteger 0 = False
    +    fromInteger _ = True
    +
    +instance Bits Bool where
    +    (.&.)           = (&&)
    +    (.|.)           = (||)
    +    xor True True   = False
    +    xor False False = False
    +    xor _ _         = True
    +    complement      = not
    +    shiftL a b      = a && (b == 0)
    +    shiftR a b      = a && (b == 0)
    +    shift  a b      = a && (b == 0)
    +    rotate a _      = a
    +    bit             = (==0)
    +    setBit a b      = a || (b == 0)
    +    testBit a b     = a && (b == 0)
    +    bitSize _       = 1
    +    isSigned _      = False
    hunk ./doc/html/monoids/src/Data-Monoid-Monad.html 26
    -    , module Data.Ring.Semi.Near
    +    , module Data.Ring.Module
    hunk ./doc/html/monoids/src/Data-Monoid-Monad.html 39
    -import Data.Ring.Semi.Near
    -import Data.Ring.Module
    -import Control.Monad
    -
    --- | An 'Action' uses glues together 'Monad' actions with (>>)
    ---   in the manner of 'mapM_' from "Data.Foldable". Any values returned by 
    ---   reduced actions are discarded.
    -newtype Action m = Action { getAction :: m () } 
    -
    -instance Monad m => Monoid (Action m) where
    -    mempty = Action (return ())
    -    Action a `mappend` Action b = Action (a >> b)
    -
    -instance Monad m => Reducer (m a) (Action m) where
    -    unit a = Action (a >> return ())
    -    a `cons` Action b = Action (a >> b)
    -    Action a `snoc` b = Action (a >> b >> return ())
    -
    -{-# RULES "unitAction" unit = Action #-}
    -{-# RULES "snocAction" snoc = snocAction #-} 
    -
    --- | Efficiently avoid needlessly rebinding when using 'snoc' on an action that already returns ()
    ---   A rewrite rule automatically applies this when possible
    -snocAction :: Reducer (m ()) (Action m) => Action m -> m () -> Action m
    -snocAction a = mappend a . Action
    -
    --- | A 'MonadSum' turns any 'MonadPlus' instance into a 'Monoid'.
    ---   It also provides a 'Multiplicative' instance for a 'Monad' wrapped around a 'Monoid'
    ---   and asserts that any 'MonadPlus' applied to a 'Monoid' forms a 'RightSemiNearRing' 
    ---   under these operations.
    -
    -newtype MonadSum m a = MonadSum { getMonadSum :: m a } 
    -    deriving (Eq,Ord,Show,Read,Monad,MonadPlus)
    -
    -instance MonadPlus m => Monoid (MonadSum m a) where
    -    mempty = mzero
    -    mappend = mplus
    -
    -instance (Monad m, Monoid a) => Multiplicative (MonadSum m a) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance Monad m => Functor (MonadSum m) where
    -    fmap = liftM
    -
    -instance Monad m => Applicative (MonadSum m) where
    -    pure = return
    -    (<*>) = ap
    -
    -instance Monad m => Pointed (MonadSum m) where
    -    point = return
    -
    -instance MonadPlus m => Reducer (m a) (MonadSum m a) where
    -    unit = MonadSum
    -
    -instance (MonadPlus m, Monoid a) => Ringoid (MonadSum m a)
    -
    -instance (MonadPlus m, Monoid a) => RightSemiNearRing (MonadSum m a)
    -
    --- | if @m@ is a 'Module' over @r@ and @f@ is a 'Monad' then @f `Mon` m@ is a 'Module' as well
    -
    -newtype Mon f m = Mon { getMon :: f m } 
    -    deriving (Eq,Ord,Show,Read,Functor,Pointed, Monad,MonadPlus)
    -
    -instance (Monoid m, Monad f) => Monoid (f `Mon` m) where
    -    mempty = return mempty
    -    mappend = liftM2 mappend
    -
    -instance (Group m, Monad f) => Group (f `Mon` m) where
    -    gnegate = liftM gnegate
    -    minus = liftM2 minus
    -    gsubtract = liftM2 gsubtract
    -
    -instance (c `Reducer` m, Monad f) => Reducer c (f `Mon` m) where
    -    unit = return . unit
    -
    -instance (LeftModule r m, Monad f) => LeftModule r (f `Mon` m) where
    -    x *. m = liftM (x *.) m
    -
    -instance (RightModule r m, Monad f) => RightModule r (f `Mon` m) where
    -    m .* y = liftM (.* y) m
    -
    -instance (Module r m, Monad f) => Module r (f `Mon` m)
    +import Data.Ring.Module
    +import Control.Monad
    +
    +-- | An 'Action' uses glues together 'Monad' actions with (>>)
    +--   in the manner of 'mapM_' from "Data.Foldable". Any values returned by 
    +--   reduced actions are discarded.
    +newtype Action m = Action { getAction :: m () } 
    +
    +instance Monad m => Monoid (Action m) where
    +    mempty = Action (return ())
    +    Action a `mappend` Action b = Action (a >> b)
    +
    +instance Monad m => Reducer (m a) (Action m) where
    +    unit a = Action (a >> return ())
    +    a `cons` Action b = Action (a >> b)
    +    Action a `snoc` b = Action (a >> b >> return ())
    +
    +{-# RULES "unitAction" unit = Action #-}
    +{-# RULES "snocAction" snoc = snocAction #-} 
    +
    +-- | Efficiently avoid needlessly rebinding when using 'snoc' on an action that already returns ()
    +--   A rewrite rule automatically applies this when possible
    +snocAction :: Reducer (m ()) (Action m) => Action m -> m () -> Action m
    +snocAction a = mappend a . Action
    +
    +-- | A 'MonadSum' turns any 'MonadPlus' instance into a 'Monoid'.
    +--   It also provides a 'Multiplicative' instance for a 'Monad' wrapped around a 'Monoid'
    +--   and asserts that any 'MonadPlus' applied to a 'Monoid' forms a 'RightSemiNearRing' 
    +--   under these operations.
    +
    +newtype MonadSum m a = MonadSum { getMonadSum :: m a } 
    +    deriving (Eq,Ord,Show,Read,Monad,MonadPlus)
    +
    +instance MonadPlus m => Monoid (MonadSum m a) where
    +    mempty = mzero
    +    mappend = mplus
    +
    +instance (Monad m, Monoid a) => Multiplicative (MonadSum m a) where
    +    one = return mempty
    +    times = liftM2 mappend
    +
    +instance Monad m => Functor (MonadSum m) where
    +    fmap = liftM
    +
    +instance Monad m => Applicative (MonadSum m) where
    +    pure = return
    +    (<*>) = ap
    +
    +instance Monad m => Pointed (MonadSum m) where
    +    point = return
    +
    +instance MonadPlus m => Reducer (m a) (MonadSum m a) where
    +    unit = MonadSum
    +
    +instance (MonadPlus m, Monoid a) => Ringoid (MonadSum m a)
    +
    +instance (MonadPlus m, Monoid a) => RightSemiNearRing (MonadSum m a)
    +
    +-- | if @m@ is a 'Module' over @r@ and @f@ is a 'Monad' then @f `Mon` m@ is a 'Module' as well
    +
    +newtype Mon f m = Mon { getMon :: f m } 
    +    deriving (Eq,Ord,Show,Read,Functor,Pointed, Monad,MonadPlus)
    +
    +instance (Monoid m, Monad f) => Monoid (f `Mon` m) where
    +    mempty = return mempty
    +    mappend = liftM2 mappend
    +
    +instance (Group m, Monad f) => Group (f `Mon` m) where
    +    gnegate = liftM gnegate
    +    minus = liftM2 minus
    +    gsubtract = liftM2 gsubtract
    +
    +instance (c `Reducer` m, Monad f) => Reducer c (f `Mon` m) where
    +    unit = return . unit
    +
    +instance (LeftModule r m, Monad f) => LeftModule r (f `Mon` m) where
    +    x *. m = liftM (x *.) m
    +
    +instance (RightModule r m, Monad f) => RightModule r (f `Mon` m) where
    +    m .* y = liftM (.* y) m
    +
    +instance (Module r m, Monad f) => Module r (f `Mon` m)
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative-Sugar.html 20
    --- > import Prelude hiding ((+),(*))
    +-- > import Prelude hiding ((+),(*),(^))
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative-Sugar.html 28
    -    , (*)
    -    ) where
    -
    -import Data.Monoid.Additive.Sugar
    -import Data.Monoid.Multiplicative
    -import Prelude hiding ((*))
    -
    -infixl 7 *
    -
    -(*) :: Multiplicative r => r -> r -> r
    -(*) = times
    +    , module Data.Ring.Semi.Natural
    +    , (*)
    +    , (^)
    +    ) where
    +
    +import Data.Monoid.Additive.Sugar
    +import Data.Monoid.Multiplicative
    +import Data.Monoid.Combinators as Monoid
    +import Data.Ring.Semi.Natural
    +import Prelude hiding ((*),(^))
    +
    +infixl 7 *
    +
    +(*) :: Multiplicative r => r -> r -> r
    +(*) = times
    +
    +(^) :: Multiplicative r => r -> Natural -> r
    +r ^ n = getLog (Monoid.replicate (Log r) n)
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative.html 52
    -
    -import Control.Concurrent.STM
    -
    -import Control.Monad.Cont
    -import Control.Monad.Identity
    +import Data.Monoid.Additive
    +import Data.Generator
    +import Data.Monoid.Instances ()
    +import Data.Monoid.Self
    +import Data.Ratio
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative.html 58
    -import Control.Monad.Reader
    -
    -import qualified Control.Monad.RWS.Lazy as LRWS
    -import qualified Control.Monad.RWS.Strict as SRWS
    -
    -import qualified Control.Monad.State.Lazy as LState
    -import qualified Control.Monad.State.Strict as SState
    -
    -import qualified Control.Monad.Writer.Lazy as LWriter
    -import qualified Control.Monad.Writer.Strict as SWriter
    -
    -import qualified Control.Monad.ST.Lazy as LST
    -import qualified Control.Monad.ST.Strict as SST
    -
    -import Data.FingerTree
    -
    -import Data.Monoid.Additive
    -import Data.Monoid.FromString
    -import Data.Generator
    -import Data.Monoid.Instances ()
    -import Data.Monoid.Self
    +#ifdef M_STM
    +import Control.Concurrent.STM
    +#endif
    +
    +#ifdef M_MTL
    +import Control.Monad.Cont
    +import Control.Monad.Identity
    +import Control.Monad.Reader
    +import qualified Control.Monad.RWS.Lazy as LRWS
    +import qualified Control.Monad.RWS.Strict as SRWS
    +import qualified Control.Monad.State.Lazy as LState
    +import qualified Control.Monad.State.Strict as SState
    +import qualified Control.Monad.Writer.Lazy as LWriter
    +import qualified Control.Monad.Writer.Strict as SWriter
    +import qualified Control.Monad.ST.Lazy as LST
    +import qualified Control.Monad.ST.Strict as SST
    +#endif
    +
    +#ifdef M_FINGERTREE
    +import Data.FingerTree
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative.html 80
    -import Data.Ratio
    -
    -import qualified Data.Sequence as Seq
    -import Data.Sequence (Seq)
    +#ifdef M_CONTAINERS
    +import qualified Data.Sequence as Seq
    +import Data.Sequence (Seq)
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative.html 85
    -import Text.Parsec.Prim
    -
    -class Multiplicative m where
    -    one :: m
    -    times :: m -> m -> m
    -
    -instance Multiplicative m => Multiplicative (Dual m) where
    -    one = Dual one
    -    Dual x `times` Dual y = Dual (y `times` x)
    -
    -instance Multiplicative m => Multiplicative (m `ReducedBy` s) where
    -    one = Reduction one
    -    Reduction x `times` Reduction y = Reduction (x `times` y)
    -
    --- | Convert a 'Multiplicative' into a 'Monoid'. Mnemonic: @Log a + Log b = Log (a * b)@
    -data Log m = Log { getLog :: m }
    -
    -instance Multiplicative m => Monoid (Log m) where
    -    mempty = Log one
    -    Log a `mappend` Log b = Log (a `times` b)
    -
    --- | Convert a 'Monoid' into a 'Multiplicative'. Mnemonic: @Exp a * Exp b = Exp (a + b)@
    -data Exp m = Exp { getExp :: m }
    -
    -instance Monoid m => Multiplicative (Exp m) where
    -    one = Exp mempty
    -    Exp a `times` Exp b = Exp (a `mappend` b)
    -
    --- simple monoid transformer instances
    -instance Multiplicative m => Multiplicative (Self m) where
    -    one = Self one  
    -    Self a `times` Self b = Self (a `times` b)
    -
    -instance Multiplicative m => Multiplicative (FromString m) where
    -    one = FromString one
    -    FromString a `times` FromString b = FromString (a `times` b)
    -
    --- the goal of this is that I can make left seminearrings out of any 'Alternative' wrapped around a monoid
    --- in particular its useful for containers
    -
    -instance Monoid m => Multiplicative [m] where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance Monoid m => Multiplicative (Seq m) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    --- and things that can't quite be a Monad in Haskell
    -instance (Measured v m, Monoid m) => Multiplicative (FingerTree v m) where
    -    one = singleton mempty
    -    xss `times` yss = getSelf $ mapReduce (flip fmap' yss . mappend) xss
    -
    --- but it can at least serve as a canonical multiplication for any monad. 
    -instance Monoid m => Multiplicative (Maybe m) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance Monoid m => Multiplicative (Identity m) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance (Monoid m) => Multiplicative (Cont r m) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance (Monoid w, Monoid m) => Multiplicative (SRWS.RWS r w s m) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance (Monoid w, Monoid m) => Multiplicative (LRWS.RWS r w s m) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance Monoid m => Multiplicative (SState.State s m) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance Monoid m => Multiplicative (LState.State s m) where
    +#ifdef M_PARSEC
    +import Text.Parsec.Prim
    +#endif
    +
    +#ifdef X_OverloadedStrings
    +import Data.Monoid.FromString
    +#endif
    +
    +class Multiplicative m where
    +    one :: m
    +    times :: m -> m -> m
    +
    +instance Multiplicative m => Multiplicative (Dual m) where
    +    one = Dual one
    +    Dual x `times` Dual y = Dual (y `times` x)
    +
    +instance Multiplicative m => Multiplicative (m `ReducedBy` s) where
    +    one = Reduction one
    +    Reduction x `times` Reduction y = Reduction (x `times` y)
    +
    +-- | Convert a 'Multiplicative' into a 'Monoid'. Mnemonic: @Log a + Log b = Log (a * b)@
    +data Log m = Log { getLog :: m }
    +
    +instance Multiplicative m => Monoid (Log m) where
    +    mempty = Log one
    +    Log a `mappend` Log b = Log (a `times` b)
    +
    +-- | Convert a 'Monoid' into a 'Multiplicative'. Mnemonic: @Exp a * Exp b = Exp (a + b)@
    +data Exp m = Exp { getExp :: m }
    +
    +instance Monoid m => Multiplicative (Exp m) where
    +    one = Exp mempty
    +    Exp a `times` Exp b = Exp (a `mappend` b)
    +
    +instance Multiplicative m => Multiplicative (Self m) where
    +    one = Self one  
    +    Self a `times` Self b = Self (a `times` b)
    +
    +-- Monad instances
    +instance Monoid m => Multiplicative [m] where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance Monoid m => Multiplicative (Maybe m) where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance Monoid n => Multiplicative (IO n) where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance Monoid n => Multiplicative (SST.ST s n) where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance Monoid n => Multiplicative (LST.ST s n) where
    +    one = return mempty
    +    times = liftM2 mappend
    +
    +-- Applicative instances
    +instance Monoid n => Multiplicative (ZipList n) where
    +    one = pure mempty
    +    times = liftA2 mappend
    +
    +instance Monoid m => Multiplicative (Const m a) where
    +    one = pure undefined
    +    times = liftA2 undefined
    +
    +-- Numeric instances
    +instance Multiplicative Int where
    +    one = 1
    +    times = (*)
    +
    +instance Multiplicative Integer where
    +    one = 1
    +    times = (*)
    +
    +instance Integral m => Multiplicative (Ratio m) where
    +    one = 1
    +    times = (*)
    +
    +#ifdef M_CONTAINERS
    +instance Monoid m => Multiplicative (Seq m) where
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative.html 166
    -
    -instance Monoid m => Multiplicative (Reader e m) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance (Monoid w, Monoid m) => Multiplicative (SWriter.Writer w m) where
    -    one = return mempty
    -    times = liftM2 mappend
    +#endif
    +
    +#ifdef M_FINGERTREE
    +-- and things that can't quite be a Monad in Haskell
    +instance (Measured v m, Monoid m) => Multiplicative (FingerTree v m) where
    +    one = singleton mempty
    +    xss `times` yss = getSelf $ mapReduce (flip fmap' yss . mappend) xss
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative.html 175
    -instance (Monoid w, Monoid m) => Multiplicative (LWriter.Writer w m) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance (Monad m, Monoid n) => Multiplicative (ContT r m n) where
    -    one = return mempty 
    +#ifdef M_MTL
    +instance Monoid m => Multiplicative (Identity m) where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance (Monoid m) => Multiplicative (Cont r m) where
    +    one = return mempty
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative.html 182
    -
    -instance (Monad m, Monoid w, Monoid n) => Multiplicative (SRWS.RWST r w s m n) where 
    -    one = return mempty 
    -    times = liftM2 mappend
    -
    -instance (Monad m, Monoid w, Monoid n) => Multiplicative (LRWS.RWST r w s m n) where 
    -    one = return mempty 
    -    times = liftM2 mappend
    -
    -instance (Monad m, Monoid n) => Multiplicative (SState.StateT s m n) where
    +instance (Monoid w, Monoid m) => Multiplicative (SRWS.RWS r w s m) where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance (Monoid w, Monoid m) => Multiplicative (LRWS.RWS r w s m) where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance Monoid m => Multiplicative (SState.State s m) where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance Monoid m => Multiplicative (LState.State s m) where
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative.html 194
    -
    -instance (Monad m, Monoid n) => Multiplicative (LState.StateT s m n) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance (Monad m, Monoid n) => Multiplicative (ReaderT e m n) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance (Monad m, Monoid w, Monoid n) => Multiplicative (SWriter.WriterT w m n) where
    +instance Monoid m => Multiplicative (Reader e m) where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance (Monoid w, Monoid m) => Multiplicative (SWriter.Writer w m) where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance (Monoid w, Monoid m) => Multiplicative (LWriter.Writer w m) where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance (Monad m, Monoid n) => Multiplicative (ContT r m n) where
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative.html 206
    -
    -instance (Monad m, Monoid w, Monoid n) => Multiplicative (LWriter.WriterT w m n) where
    -    one = return mempty 
    -    times = liftM2 mappend
    -
    -instance Monoid n => Multiplicative (IO n) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance Monoid n => Multiplicative (SST.ST s n) where
    +instance (Monad m, Monoid w, Monoid n) => Multiplicative (SRWS.RWST r w s m n) where 
    +    one = return mempty 
    +    times = liftM2 mappend
    +instance (Monad m, Monoid w, Monoid n) => Multiplicative (LRWS.RWST r w s m n) where 
    +    one = return mempty 
    +    times = liftM2 mappend
    +instance (Monad m, Monoid n) => Multiplicative (SState.StateT s m n) where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance (Monad m, Monoid n) => Multiplicative (LState.StateT s m n) where
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative.html 218
    -
    -instance Monoid n => Multiplicative (LST.ST s n) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance Monoid n => Multiplicative (STM n) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    -instance (Stream s m t, Monoid n) => Multiplicative (ParsecT s u m n) where
    -    one = return mempty
    -    times = liftM2 mappend
    -
    --- Applicative instances
    -
    -instance Monoid n => Multiplicative (ZipList n) where
    -    one = pure mempty
    -    times = liftA2 mappend
    -
    -instance Monoid m => Multiplicative (Const m a) where
    -    one = pure undefined
    -    times = liftA2 undefined
    +instance (Monad m, Monoid n) => Multiplicative (ReaderT e m n) where
    +    one = return mempty
    +    times = liftM2 mappend
    +instance (Monad m, Monoid w, Monoid n) => Multiplicative (SWriter.WriterT w m n) where
    +    one = return mempty 
    +    times = liftM2 mappend
    +instance (Monad m, Monoid w, Monoid n) => Multiplicative (LWriter.WriterT w m n) where
    +    one = return mempty 
    +    times = liftM2 mappend
    +#endif
    +
    +#ifdef M_STM
    +instance Monoid n => Multiplicative (STM n) where
    +    one = return mempty
    +    times = liftM2 mappend
    +#endif
    +
    +#ifdef M_PARSEC
    +instance (Stream s m t, Monoid n) => Multiplicative (ParsecT s u m n) where
    +    one = return mempty
    +    times = liftM2 mappend
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Multiplicative.html 241
    --- Numeric instances
    -instance Multiplicative Int where
    -    one = 1
    -    times = (*)
    -
    -instance Multiplicative Integer where
    -    one = 1
    -    times = (*)
    -
    -instance Integral m => Multiplicative (Ratio m) where
    -    one = 1
    -    times = (*)
    -
    +#ifdef X_OverloadedStrings 
    +instance Multiplicative m => Multiplicative (FromString m) where
    +    one = FromString one
    +    FromString a `times` FromString b = FromString (a `times` b)
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Ord.html 39
    -import Data.Ring.Semi
    +import Data.Ring
    hunk ./doc/html/monoids/src/Data-Monoid-Reducer.html 9
    -
    {-# LANGUAGE UndecidableInstances , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , GeneralizedNewtypeDeriving, TypeOperators, ScopedTypeVariables #-}
    +
    {-# LANGUAGE UndecidableInstances , FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , GeneralizedNewtypeDeriving, TypeOperators, ScopedTypeVariables, CPP #-}
    hunk ./doc/html/monoids/src/Data-Monoid-Reducer.html 15
    --- License     :  BSD-style
    +-- License     :  BSD3
    hunk ./doc/html/monoids/src/Data-Monoid-Reducer.html 44
    -import Data.FingerTree
    -
    -import qualified Data.Sequence as Seq
    -import Data.Sequence (Seq)
    +
    +#ifdef M_FINGERTREE
    +import Data.FingerTree
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Reducer.html 49
    -import qualified Data.Set as Set
    -import Data.Set (Set)
    -
    -import qualified Data.IntSet as IntSet
    -import Data.IntSet (IntSet)
    -
    -import qualified Data.IntMap as IntMap
    -import Data.IntMap (IntMap)
    -
    -import Data.Reflection
    -
    -import qualified Data.Map as Map
    +#ifdef M_CONTAINERS
    +import qualified Data.Sequence as Seq
    +import Data.Sequence (Seq)
    +import qualified Data.Set as Set
    +import Data.Set (Set)
    +import qualified Data.IntSet as IntSet
    +import Data.IntSet (IntSet)
    +import qualified Data.IntMap as IntMap
    +import Data.IntMap (IntMap)
    +import qualified Data.Map as Map
    +import Data.Map (Map)
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Reducer.html 62
    -import Data.Map (Map)
    -
    -import Text.Parsec.Prim
    +#ifdef M_REFLECTION
    +import Data.Reflection
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Reducer.html 66
    ---import qualified Data.BitSet as BitSet
    ---import Data.BitSet (BitSet)
    -
    --- | This type may be best read infix. A @c `Reducer` m@ is a 'Monoid' @m@ that maps
    --- values of type @c@ through @unit@ to values of type @m@. A @c@-'Reducer' may also
    --- supply operations which tack-on another @c@ to an existing 'Monoid' @m@ on the left
    --- or right. These specialized reductions may be more efficient in some scenarios
    --- and are used when appropriate by a 'Generator'. The names 'cons' and 'snoc' work
    --- by analogy to the synonymous operations in the list monoid.
    ---
    --- This class deliberately avoids functional-dependencies, so that () can be a @c@-Reducer
    --- for all @c@, and so many common reducers can work over multiple types, for instance,
    --- First and Last may reduce both @a@ and 'Maybe' @a@. Since a 'Generator' has a fixed element
    --- type, the input to the reducer is generally known and extracting from the monoid usually
    --- is sufficient to fix the result type. Combinators are available for most scenarios where
    --- this is not the case, and the few remaining cases can be handled by using an explicit 
    --- type annotation.
    ---
    --- Minimal definition: 'unit' or 'snoc'
    -class Monoid m => Reducer c m where
    -    -- | Convert a value into a 'Monoid'
    -    unit :: c -> m 
    -    -- | Append a value to a 'Monoid' for use in left-to-right reduction
    -    snoc :: m -> c -> m
    -    -- | Prepend a value onto a 'Monoid' for use during right-to-left reduction
    -    cons :: c -> m -> m 
    -
    -    unit = snoc mempty 
    -    snoc m = mappend m . unit
    -    cons = mappend . unit
    -
    --- | Apply a 'Reducer' to a 'Foldable' container, after mapping the contents into a suitable form for reduction.
    -foldMapReduce :: (Foldable f, e `Reducer` m) => (a -> e) -> f a -> m
    -foldMapReduce f = foldMap (unit . f)
    -
    --- | Apply a 'Reducer' to a 'Foldable' mapping each element through 'unit'
    -foldReduce :: (Foldable f, e `Reducer` m) => f e -> m
    -foldReduce = foldMap unit
    -
    -returnUnit :: (Monad m, c `Reducer` n) => c -> m n 
    -returnUnit = return . unit
    -
    -pureUnit :: (Applicative f, c `Reducer` n) => c -> f n
    -pureUnit = pure . unit
    -
    -instance (Reducer c m, Reducer c n) => Reducer c (m,n) where
    -    unit x = (unit x,unit x)
    -    (m,n) `snoc` x = (m `snoc` x, n `snoc` x)
    -    x `cons` (m,n) = (x `cons` m, x `cons` n)
    -
    -instance (Reducer c m, Reducer c n, Reducer c o) => Reducer c (m,n,o) where
    -    unit x = (unit x,unit x, unit x)
    -    (m,n,o) `snoc` x = (m `snoc` x, n `snoc` x, o `snoc` x)
    -    x `cons` (m,n,o) = (x `cons` m, x `cons` n, x `cons` o)
    -
    -instance (Reducer c m, Reducer c n, Reducer c o, Reducer c p) => Reducer c (m,n,o,p) where
    -    unit x = (unit x,unit x, unit x, unit x)
    -    (m,n,o,p) `snoc` x = (m `snoc` x, n `snoc` x, o `snoc` x, p `snoc` x)
    -    x `cons` (m,n,o,p) = (x `cons` m, x `cons` n, x `cons` o, x `cons` p)
    -
    -instance Reducer c [c] where
    -    unit = return
    -    cons = (:)
    -    xs `snoc` x = xs ++ [x]
    -
    -instance Reducer c () where
    -    unit _ = ()
    -    _ `snoc` _ = ()
    -    _ `cons` _ = ()
    -
    -instance Reducer Bool Any where
    -    unit = Any
    -
    -instance Reducer Bool All where
    -    unit = All
    -
    -instance Reducer (a -> a) (Endo a) where
    -    unit = Endo
    -
    -instance Monoid a => Reducer a (Dual a) where
    -    unit = Dual
    -    
    -instance Num a => Reducer a (Sum a) where
    -    unit = Sum
    -
    -instance Num a => Reducer a (Product a) where
    -    unit = Product
    -
    -instance Reducer (Maybe a) (First a) where
    -    unit = First
    -
    -instance Reducer a (First a) where
    -    unit = First . Just
    -
    -instance Reducer (Maybe a) (Last a) where
    -    unit = Last
    -
    -instance Reducer a (Last a) where
    -    unit = Last . Just
    -
    -instance Measured v a => Reducer a (FingerTree v a) where
    -    unit = singleton
    -    cons = (<|)
    -    snoc = (|>) 
    -
    -instance (Stream s m t, c `Reducer` a) => Reducer c (ParsecT s u m a) where
    -    unit = return . unit
    +#ifdef M_PARSEC
    +import Text.Parsec.Prim
    +#endif
    +
    +-- | This type may be best read infix. A @c `Reducer` m@ is a 'Monoid' @m@ that maps
    +-- values of type @c@ through @unit@ to values of type @m@. A @c@-'Reducer' may also
    +-- supply operations which tack-on another @c@ to an existing 'Monoid' @m@ on the left
    +-- or right. These specialized reductions may be more efficient in some scenarios
    +-- and are used when appropriate by a 'Generator'. The names 'cons' and 'snoc' work
    +-- by analogy to the synonymous operations in the list monoid.
    +--
    +-- This class deliberately avoids functional-dependencies, so that () can be a @c@-Reducer
    +-- for all @c@, and so many common reducers can work over multiple types, for instance,
    +-- First and Last may reduce both @a@ and 'Maybe' @a@. Since a 'Generator' has a fixed element
    +-- type, the input to the reducer is generally known and extracting from the monoid usually
    +-- is sufficient to fix the result type. Combinators are available for most scenarios where
    +-- this is not the case, and the few remaining cases can be handled by using an explicit 
    +-- type annotation.
    +--
    +-- Minimal definition: 'unit' or 'snoc'
    +class Monoid m => Reducer c m where
    +    -- | Convert a value into a 'Monoid'
    +    unit :: c -> m 
    +    -- | Append a value to a 'Monoid' for use in left-to-right reduction
    +    snoc :: m -> c -> m
    +    -- | Prepend a value onto a 'Monoid' for use during right-to-left reduction
    +    cons :: c -> m -> m 
    +
    +    unit = snoc mempty 
    +    snoc m = mappend m . unit
    +    cons = mappend . unit
    +
    +-- | Apply a 'Reducer' to a 'Foldable' container, after mapping the contents into a suitable form for reduction.
    +foldMapReduce :: (Foldable f, e `Reducer` m) => (a -> e) -> f a -> m
    +foldMapReduce f = foldMap (unit . f)
    +
    +-- | Apply a 'Reducer' to a 'Foldable' mapping each element through 'unit'
    +foldReduce :: (Foldable f, e `Reducer` m) => f e -> m
    +foldReduce = foldMap unit
    +
    +returnUnit :: (Monad m, c `Reducer` n) => c -> m n 
    +returnUnit = return . unit
    +
    +pureUnit :: (Applicative f, c `Reducer` n) => c -> f n
    +pureUnit = pure . unit
    +
    +instance (Reducer c m, Reducer c n) => Reducer c (m,n) where
    +    unit x = (unit x,unit x)
    +    (m,n) `snoc` x = (m `snoc` x, n `snoc` x)
    +    x `cons` (m,n) = (x `cons` m, x `cons` n)
    +
    +instance (Reducer c m, Reducer c n, Reducer c o) => Reducer c (m,n,o) where
    +    unit x = (unit x,unit x, unit x)
    +    (m,n,o) `snoc` x = (m `snoc` x, n `snoc` x, o `snoc` x)
    +    x `cons` (m,n,o) = (x `cons` m, x `cons` n, x `cons` o)
    +
    +instance (Reducer c m, Reducer c n, Reducer c o, Reducer c p) => Reducer c (m,n,o,p) where
    +    unit x = (unit x,unit x, unit x, unit x)
    +    (m,n,o,p) `snoc` x = (m `snoc` x, n `snoc` x, o `snoc` x, p `snoc` x)
    +    x `cons` (m,n,o,p) = (x `cons` m, x `cons` n, x `cons` o, x `cons` p)
    +
    +instance Reducer c [c] where
    +    unit = return
    +    cons = (:)
    +    xs `snoc` x = xs ++ [x]
    +
    +instance Reducer c () where
    +    unit _ = ()
    +    _ `snoc` _ = ()
    +    _ `cons` _ = ()
    +
    +instance Reducer Bool Any where
    +    unit = Any
    +
    +instance Reducer Bool All where
    +    unit = All
    +
    +instance Reducer (a -> a) (Endo a) where
    +    unit = Endo
    +
    +instance Monoid a => Reducer a (Dual a) where
    +    unit = Dual
    +    
    +instance Num a => Reducer a (Sum a) where
    +    unit = Sum
    +
    +instance Num a => Reducer a (Product a) where
    +    unit = Product
    +
    +instance Reducer (Maybe a) (First a) where
    +    unit = First
    +
    +instance Reducer a (First a) where
    +    unit = First . Just
    +
    +instance Reducer (Maybe a) (Last a) where
    +    unit = Last
    +
    +instance Reducer a (Last a) where
    +    unit = Last . Just
    +
    +#ifdef M_FINGERTREE
    +instance Measured v a => Reducer a (FingerTree v a) where
    +    unit = singleton
    +    cons = (<|)
    +    snoc = (|>) 
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Reducer.html 174
    -instance Reducer a (Seq a) where
    -    unit = Seq.singleton
    -    cons = (Seq.<|)
    -    snoc = (Seq.|>)
    +#ifdef M_PARSEC
    +instance (Stream s m t, c `Reducer` a) => Reducer c (ParsecT s u m a) where
    +    unit = return . unit
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Reducer.html 179
    -instance Reducer Int IntSet where
    -    unit = IntSet.singleton
    -    cons = IntSet.insert
    -    snoc = flip IntSet.insert -- left bias irrelevant
    -
    -instance Ord a => Reducer a (Set a) where
    -    unit = Set.singleton
    -    cons = Set.insert
    -    -- pedantic about order in case 'Eq' doesn't implement structural equality
    -    snoc s m | Set.member m s = s 
    -             | otherwise = Set.insert m s
    -
    -instance Reducer (Int,v) (IntMap v) where
    -    unit = uncurry IntMap.singleton
    -    cons = uncurry IntMap.insert
    -    snoc = flip . uncurry . IntMap.insertWith $ const id
    -
    -instance Ord k => Reducer (k,v) (Map k v) where
    -    unit = uncurry Map.singleton
    -    cons = uncurry Map.insert
    -    snoc = flip . uncurry . Map.insertWith $ const id
    -
    -{-
    -instance Enum a => Reducer a (BitSet a) where
    -    unit m = BitSet.insert m BitSet.empty
    --}
    -
    -data (m `ReducedBy` s) = Reduction { getReduction :: m } 
    +#ifdef M_CONTAINERS
    +instance Reducer a (Seq a) where
    +    unit = Seq.singleton
    +    cons = (Seq.<|)
    +    snoc = (Seq.|>)
    +
    +instance Reducer Int IntSet where
    +    unit = IntSet.singleton
    +    cons = IntSet.insert
    +    snoc = flip IntSet.insert -- left bias irrelevant
    +
    +instance Ord a => Reducer a (Set a) where
    +    unit = Set.singleton
    +    cons = Set.insert
    +    -- pedantic about order in case 'Eq' doesn't implement structural equality
    +    snoc s m | Set.member m s = s 
    +             | otherwise = Set.insert m s
    +
    +instance Reducer (Int,v) (IntMap v) where
    +    unit = uncurry IntMap.singleton
    +    cons = uncurry IntMap.insert
    +    snoc = flip . uncurry . IntMap.insertWith $ const id
    +
    +instance Ord k => Reducer (k,v) (Map k v) where
    +    unit = uncurry Map.singleton
    +    cons = uncurry Map.insert
    +    snoc = flip . uncurry . Map.insertWith $ const id
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Reducer.html 208
    -instance Monoid m => Monoid (m `ReducedBy` s) where
    -    mempty = Reduction mempty
    -    Reduction a `mappend` Reduction b = Reduction (a `mappend` b)
    -
    -instance (s `Reflects` (a -> m), Monoid m) => Reducer a (m `ReducedBy` s) where
    -    unit = Reduction . reflect (undefined :: s)
    +#ifdef M_REFLECTION
    +data (m `ReducedBy` s) = Reduction { getReduction :: m } 
    +
    +instance Monoid m => Monoid (m `ReducedBy` s) where
    +    mempty = Reduction mempty
    +    Reduction a `mappend` Reduction b = Reduction (a `mappend` b)
    +
    +instance (s `Reflects` (a -> m), Monoid m) => Reducer a (m `ReducedBy` s) where
    +    unit = Reduction . reflect (undefined :: s)
    +#endif
    hunk ./doc/html/monoids/src/Data-Monoid-Sugar.html 1
    +
    +
    +
    +
    +Data/Monoid/Sugar.hs
    +
    +
    +
    +
    -----------------------------------------------------------------------------
    +-- |
    +-- Module      :  Data.Monoid.Additive.Sugar
    +-- Copyright   :  (c) Edward Kmett 2009
    +-- License     :  BSD-style
    +-- Maintainer  :  ekmett@gmail.com
    +-- Stability   :  experimental
    +-- Portability :  portable
    +--
    +-- Syntactic sugar for working with a 'Monoid' and 'Multiplicative' instances 
    +-- that conflicts with names from the "Prelude".
    +--
    +-- > import Prelude hiding ((+),(*),(^))
    +-- > import Data.Monoid.Sugar
    +--
    +-----------------------------------------------------------------------------
    +--
    +module Data.Monoid.Sugar
    +    ( module Data.Monoid.Multiplicative
    +    , module Data.Ring.Semi.Natural
    +    , (+)
    +    , (*)
    +    , (^)
    +    ) where
    +
    +import Prelude hiding ((*),(^),(+))
    +import Data.Monoid.Multiplicative
    +import Data.Ring.Semi.Natural
    +import qualified Data.Monoid.Combinators as Monoid
    +
    +infixl 6 + 
    +infixl 7 *
    +
    +(+) :: Monoid m => m -> m -> m 
    +(+) = mappend
    +
    +(*) :: Multiplicative r => r -> r -> r
    +(*) = times
    +
    +(^) :: Multiplicative r => r -> Natural -> r
    +r ^ n = getLog (Monoid.replicate (Log r) n)
    +
    + hunk ./doc/html/monoids/src/Data-Ring-Boolean.html 20 --- A Boolean 'Ring' over 'Bool'. Note well that the 'mappend' of this ring is --- symmetric difference and not disjunction like you might expect. To get that --- you should use use 'Ord' from "Data.Ring.Semi.Ord.Order" on 'Bool' to get the '&&'/'||'-based --- distributive-lattice 'SemiRing' ------------------------------------------------------------------------------ - -module Data.Ring.Boolean - ( module Data.Ring - , BoolRing(BoolRing, getBoolRing) - ) where - -import Data.Ring -import Data.Monoid.Reducer -import Test.QuickCheck - -newtype BoolRing = BoolRing { getBoolRing :: Bool } deriving (Eq,Ord,Show,Read,Arbitrary,CoArbitrary) - -instance Monoid BoolRing where - mempty = BoolRing False - BoolRing a `mappend` BoolRing b = BoolRing ((a || b) && not (a && b)) +-- A Boolean 'Ring' over any Bits instance. Note well that the 'mappend' of this ring is xor. +-- You should use use 'Ord' from "Data.Ring.Semi.Ord.Order" on 'Bool' to get the '&&'/'||'-based +-- distributive-lattice 'SemiRing'. +-- +-- Also note that @gnegate = id@ in a Boolean Ring! +----------------------------------------------------------------------------- + +module Data.Ring.Boolean + ( module Data.Ring + , Boolean(Boolean, getBoolean) + ) where + +import Data.Bits +import Data.Ring +import Data.Ring.Module +import Data.Ring.Semi.Natural +import Data.Monoid.Reducer +import Test.QuickCheck hiding ((.&.)) + +newtype Boolean a = Boolean { getBoolean :: a } deriving (Eq,Ord,Show,Read,Arbitrary,CoArbitrary) hunk ./doc/html/monoids/src/Data-Ring-Boolean.html 41 -instance Group BoolRing where - gnegate = BoolRing . not . getBoolRing - -instance Multiplicative BoolRing where - one = BoolRing True - BoolRing a `times` BoolRing b = BoolRing (a && b) - -instance Ringoid BoolRing -instance LeftSemiNearRing BoolRing -instance RightSemiNearRing BoolRing -instance SemiRing BoolRing -instance Ring BoolRing - -instance Reducer Bool BoolRing where - unit = BoolRing +-- | @xor@ +instance Bits a => Monoid (Boolean a) where + mempty = Boolean 0 + Boolean a `mappend` Boolean b = Boolean ((a .|. b) .&. complement (a .&. b)) + +-- | @id@, since @x `xor` x = zero@ +instance Bits a => Group (Boolean a) where + gnegate = Boolean . id . getBoolean + +-- | @and@ +instance Bits a => Multiplicative (Boolean a) where + one = Boolean (complement 0) + Boolean a `times` Boolean b = Boolean (a .&. b) + +-- | the boolean ring (using symmetric difference as addition) is a ring +instance Bits a => Ringoid (Boolean a) +instance Bits a => LeftSemiNearRing (Boolean a) +instance Bits a => RightSemiNearRing (Boolean a) +instance Bits a => SemiRing (Boolean a) +instance Bits a => Ring (Boolean a) + +-- | it reduces boolean values +instance Bits a => Reducer a (Boolean a) where + unit = Boolean + +-- | every monoid is a module over the naturals, boolring is idempotent +instance Bits a => Module Natural (Boolean a) +instance Bits a => LeftModule Natural (Boolean a) where + 0 *. _ = mempty + _ *. m = m +instance Bits a => RightModule Natural (Boolean a) where + _ .* 0 = mempty + m .* _ = m +instance Bits a => Bimodule Natural (Boolean a) + +-- | every group is a module over the integers, boolring is idempotent +instance Bits a => Module Integer (Boolean a) +instance Bits a => LeftModule Integer (Boolean a) where + 0 *. _ = mempty + _ *. m = m +instance Bits a => RightModule Integer (Boolean a) where + _ .* 0 = mempty + m .* _ = m +instance Bits a => Bimodule Integer (Boolean a) + +-- | every ring is a module over itself +instance Bits a => Module (Boolean a) (Boolean a) +instance Bits a => LeftModule (Boolean a) (Boolean a) where + (*.) = times +instance Bits a => RightModule (Boolean a) (Boolean a) where + (.*) = times +instance Bits a => Bimodule (Boolean a) (Boolean a) +instance Bits a => Normed (Boolean a) (Boolean a) where mabs = id hunk ./doc/html/monoids/src/Data-Ring-Module-AutomaticDifferentiation.html 37 -lift :: (r `Module` m) => r -> D s r m +lift :: (r `Bimodule` m) => r -> D s r m hunk ./doc/html/monoids/src/Data-Ring-Module-AutomaticDifferentiation.html 40 -infinitesimal :: (r `Module` m, Ringoid m) => D s r m +infinitesimal :: (r `Bimodule` m, Ringoid m) => D s r m hunk ./doc/html/monoids/src/Data-Ring-Module-AutomaticDifferentiation.html 49 -instance (r `Module` m) => Monoid (D s r m) where +instance (r `Bimodule` m) => Monoid (D s r m) where hunk ./doc/html/monoids/src/Data-Ring-Module-AutomaticDifferentiation.html 53 -instance (r `Module` m) => Multiplicative (D s r m) where +instance (r `Bimodule` m) => Multiplicative (D s r m) where hunk ./doc/html/monoids/src/Data-Ring-Module-AutomaticDifferentiation.html 57 -instance (Group r, r `Module` m, Group m) => Group (D s r m) where +instance (Group r, r `Bimodule` m, Group m) => Group (D s r m) where hunk ./doc/html/monoids/src/Data-Ring-Module-AutomaticDifferentiation.html 75 -instance (Ringoid r, r `Module` m) => Ringoid (D s r m) -instance (LeftSemiNearRing r, Module r m) => LeftSemiNearRing (D s r m) -instance (RightSemiNearRing r, Module r m) => RightSemiNearRing (D s r m) -instance (SemiRing r, r `Module` m) => SemiRing (D s r m) -instance (Ring r, r `Module` m, Group m) => Ring (D s r m) +instance (Ringoid r, r `Bimodule` m) => Ringoid (D s r m) +instance (LeftSemiNearRing r, Bimodule r m) => LeftSemiNearRing (D s r m) +instance (RightSemiNearRing r, Bimodule r m) => RightSemiNearRing (D s r m) +instance (SemiRing r, r `Bimodule` m) => SemiRing (D s r m) +instance (Ring r, r `Bimodule` m, Group m) => Ring (D s r m) hunk ./doc/html/monoids/src/Data-Ring-Module-AutomaticDifferentiation.html 81 -instance (r `Module` m, c `Reducer` r, c `Reducer` m) => Reducer c (D s r m) where +instance (r `Bimodule` m, c `Reducer` r, c `Reducer` m) => Reducer c (D s r m) where hunk ./doc/html/monoids/src/Data-Ring-Module-AutomaticDifferentiation.html 93 -d :: (r `Module` m, Ringoid m) => (forall s. D s r m -> D s r m) -> (r,m) +d :: (r `Bimodule` m, Ringoid m) => (forall s. D s r m -> D s r m) -> (r,m) hunk ./doc/html/monoids/src/Data-Ring-Module.html 27 - , LeftModule - , (*.) - , RightModule - , (.*) - , Module - ) where - -import Data.Ring -import Data.Monoid.Union - --- import qualified Data.Monoid.Combinators as Monoid - --- | @ (x * y) *. m = x * (y *. m) @ -class (Monoid r, Multiplicative r, Monoid m) => LeftModule r m where - (*.) :: r -> m -> m - --- | @ (m .* x) * y = m .* (x * y) @ -class (Monoid r, Multiplicative r, Monoid m) => RightModule r m where - (.*) :: m -> r -> m - --- | @ (x *. m) .* y = x *. (m .* y) @ -class (LeftModule r m, RightModule r m) => Module r m - -instance (LeftModule r m, LeftModule r n) => LeftModule r (m,n) where - r *. (m,n) = (r *. m, r *. n) -instance (LeftModule r m, LeftModule r n, LeftModule r o) => LeftModule r (m,n,o) where - r *. (m,n,o) = (r *. m, r *. n, r *. o) -instance (LeftModule r m, LeftModule r n, LeftModule r o, LeftModule r p) => LeftModule r (m,n,o,p) where - r *. (m,n,o,p) = (r *. m, r *. n, r *. o, r *. p) -instance (LeftModule r m, LeftModule r n, LeftModule r o, LeftModule r p, LeftModule r q) => LeftModule r (m,n,o,p,q) where - r *. (m,n,o,p,q) = (r *. m, r *. n, r *. o, r *. p, r *. q) + -- * R-Modules + , Module + , LeftModule, (*.) + , RightModule, (.*) + , Bimodule + -- * R-Normed Modules + , Normed, mabs + -- * Vector Spaces + , VectorSpace + -- * R-Algebras + , Algebra + ) where + +import Data.Ring +import Data.Monoid.Union + +-- import qualified Data.Monoid.Combinators as Monoid + + +class (Ringoid r, Monoid m) => Module r m where + +-- | @ (x * y) *. m = x * (y *. m) @ +class (Module r m) => LeftModule r m where + (*.) :: r -> m -> m + +-- | @ (m .* x) * y = m .* (x * y) @ +class (Module r m) => RightModule r m where + (.*) :: m -> r -> m + +-- | @ (x *. m) .* y = x *. (m .* y) @ +class (LeftModule r m, RightModule r m) => Bimodule r m hunk ./doc/html/monoids/src/Data-Ring-Module.html 59 -instance (RightModule r m, RightModule r n) => RightModule r (m,n) where - (m,n) .* r = (m .* r, n .* r) -instance (RightModule r m, RightModule r n, RightModule r o) => RightModule r (m,n,o) where - (m,n,o) .* r = (m .* r, n .* r, o .* r) -instance (RightModule r m, RightModule r n, RightModule r o, RightModule r p ) => RightModule r (m,n,o,p) where - (m,n,o,p) .* r = (m .* r, n .* r, o .* r, p .* r) -instance (RightModule r m, RightModule r n, RightModule r o, RightModule r p, RightModule r q ) => RightModule r (m,n,o,p,q) where - (m,n,o,p,q) .* r = (m .* r, n .* r, o .* r, p .* r, q .* r) - -instance (Module r m, Module r n) => Module r (m,n) -instance (Module r m, Module r n, Module r o) => Module r (m,n,o) -instance (Module r m, Module r n, Module r o, Module r p) => Module r (m,n,o,p) -instance (Module r m, Module r n, Module r o, Module r p, Module r q) => Module r (m,n,o,p,q) - - --- we want an absorbing 0, for that we need a seminearring and a notion of equality -instance (HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => LeftModule r (UnionWith f r) where - r *. m | r == zero = zero - | otherwise = fmap (r `times`) m -instance (HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => RightModule r (UnionWith f r) where - m .* r | r == zero = zero - | otherwise = fmap (`times` r) m -instance (HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => Module r (UnionWith f r) where +class (Field f, Module f g) => VectorSpace f g + +-- | An r-normed module m satisfies: +-- +-- (1) @mabs m >= 0@ +-- +-- 2 @mabs m == zero{-_r-} => m == zero{-_m-}@ +-- +-- 3 @mabs (m + n) <= mabs m + mabs n@ +-- +-- 4 @r * mabs m = mabs (r *. m) -- if m is an r-LeftModule@ +-- +-- 5 @mabs m * r = mabs (m .* r) -- if m is an r-RightModule@ +class Module r m => Normed r m where + mabs :: m -> r + +-- | Algebra over a (near) (semi) ring. +-- @r *. (x * y) = (r *. x) * y = x * (r *. y)@ +-- @(x * y) .* r = y * (x .* r) = (y .* r) * x@ +class (r `Bimodule` m, Multiplicative m) => Algebra r m + +instance (Module r m, Module r n) => Module r (m,n) +instance (Module r m, Module r n, Module r o) => Module r (m,n,o) +instance (Module r m, Module r n, Module r o, Module r p) => Module r (m,n,o,p) +instance (Module r m, Module r n, Module r o, Module r p, Module r q) => Module r (m,n,o,p,q) + +instance (LeftModule r m, LeftModule r n) => LeftModule r (m,n) where + r *. (m,n) = (r *. m, r *. n) +instance (LeftModule r m, LeftModule r n, LeftModule r o) => LeftModule r (m,n,o) where + r *. (m,n,o) = (r *. m, r *. n, r *. o) +instance (LeftModule r m, LeftModule r n, LeftModule r o, LeftModule r p) => LeftModule r (m,n,o,p) where + r *. (m,n,o,p) = (r *. m, r *. n, r *. o, r *. p) +instance (LeftModule r m, LeftModule r n, LeftModule r o, LeftModule r p, LeftModule r q) => LeftModule r (m,n,o,p,q) where + r *. (m,n,o,p,q) = (r *. m, r *. n, r *. o, r *. p, r *. q) + +instance (RightModule r m, RightModule r n) => RightModule r (m,n) where + (m,n) .* r = (m .* r, n .* r) +instance (RightModule r m, RightModule r n, RightModule r o) => RightModule r (m,n,o) where + (m,n,o) .* r = (m .* r, n .* r, o .* r) +instance (RightModule r m, RightModule r n, RightModule r o, RightModule r p ) => RightModule r (m,n,o,p) where + (m,n,o,p) .* r = (m .* r, n .* r, o .* r, p .* r) +instance (RightModule r m, RightModule r n, RightModule r o, RightModule r p, RightModule r q ) => RightModule r (m,n,o,p,q) where + (m,n,o,p,q) .* r = (m .* r, n .* r, o .* r, p .* r, q .* r) + +instance (Bimodule r m, Bimodule r n) => Bimodule r (m,n) +instance (Bimodule r m, Bimodule r n, Bimodule r o) => Bimodule r (m,n,o) +instance (Bimodule r m, Bimodule r n, Bimodule r o, Bimodule r p) => Bimodule r (m,n,o,p) +instance (Bimodule r m, Bimodule r n, Bimodule r o, Bimodule r p, Bimodule r q) => Bimodule r (m,n,o,p,q) + +-- we want an absorbing 0, for that we need a seminearring and a notion of equality +instance (HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => LeftModule r (UnionWith f r) where + r *. m | r == zero = zero + | otherwise = fmap (r `times`) m +instance (HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => RightModule r (UnionWith f r) where + m .* r | r == zero = zero + | otherwise = fmap (`times` r) m +instance (HasUnionWith f, Ord r, Eq r, RightSemiNearRing r) => Module r (UnionWith f r) where hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 24 --- enumeration --- -------------------------------------------------------------------------------- - -module Data.Ring.Semi.BitSet - ( module Data.Monoid.Reducer - , module Data.Ring.Semi - -- * BitSet - , BitSet - -- * Manipulation - , empty - , singleton - , full - , union - , intersection - , complement - , insert - , delete - , (\\) - , fromList - , fromDistinctAscList - -- * Acessors - , member - , null - , size - , isComplemented - , toInteger - ) where - -import Prelude hiding ( null, exponent, toInteger, foldl, foldr, foldl1, foldr1 ) -import Data.Bits hiding ( complement ) -import qualified Data.Bits as Bits +-- enumeration. Treated as a Boolean semiring over `.&.`/`.|.`. To get a +-- 'Boolean' 'Ring', use @'Boolean' ('BitSet' a)@. +-- +------------------------------------------------------------------------------- + +module Data.Ring.Semi.BitSet + ( module Data.Monoid.Reducer + , module Data.Ring + -- * BitSet + , BitSet + -- * Manipulation + , empty + , singleton + , full + , union + , intersection + , complement + , insert + , delete + , (\\) + , fromList + , fromDistinctAscList + -- * Acessors + , member + , null + , size + , isComplemented + , toInteger + ) where + +import Prelude hiding ( null, exponent, toInteger, foldl, foldr, foldl1, foldr1 ) +import Data.Bits hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 59 -import Data.Ring.Semi +import Data.Ring hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 62 -import Data.Ring.Algebra +import Data.Ring.Module hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 139 -full = complement empty +full = complement' empty hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 142 --- | /O(d)/ Complements a 'BitSet' with respect to the bounds of @a@. Preserves order of 'null' and 'size' -complement :: (Enum a, Bounded a) => BitSet a -> BitSet a -complement r@(BS a b c l h m _ f) = BS (Bits.complement b) (Bits.complement a) (Bits.complement c) l h (Bits.complement m) u f where - u = (fromEnum (minBound `asArgTypeOf` r), fromEnum (maxBound `asArgTypeOf` r)) -{-# INLINE complement #-} + +-- | /O(d)/ unsafe internal method: complement a set that has already been complemented at least once. +recomplement :: BitSet a -> BitSet a +recomplement (BS a b c l h m u f) = BS (complement b) (complement a) (complement c) l h (complement m) u f +{-# INLINE recomplement #-} hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 148 --- | /O(d)/ unsafe internal method: complement a set that has already been complemented at least once. -recomplement :: BitSet a -> BitSet a -recomplement (BS a b c l h m u f) = BS (Bits.complement b) (Bits.complement a) (Bits.complement c) l h (Bits.complement m) u f -{-# INLINE recomplement #-} +-- | /O(d)/ unsafe internal method: complement a set that has already been complemented at least once. +pseudoComplement :: BitSet a -> (Int,Int) -> BitSet a +pseudoComplement (BS a b c l h m _ f) u = BS (complement b) (complement a) (complement c) l h (complement m) u f +{-# INLINE pseudoComplement #-} hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 153 --- | /O(d)/ unsafe internal method: complement a set that has already been complemented at least once. -pseudoComplement :: BitSet a -> (Int,Int) -> BitSet a -pseudoComplement (BS a b c l h m _ f) u = BS (Bits.complement b) (Bits.complement a) (Bits.complement c) l h (Bits.complement m) u f -{-# INLINE pseudoComplement #-} +-- | /O(d * n)/ Make a 'BitSet' from a list of items. +fromList :: Enum a => [a] -> BitSet a +fromList = foldr insert empty +{-# INLINE fromList #-} hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 158 --- | /O(d * n)/ Make a 'BitSet' from a list of items. -fromList :: Enum a => [a] -> BitSet a -fromList = foldr insert empty -{-# INLINE fromList #-} - --- | /O(d * n)/ Make a 'BitSet' from a distinct ascending list of items -fromDistinctAscList :: Enum a => [a] -> BitSet a -fromDistinctAscList [] = empty -fromDistinctAscList (c:cs) = fromDistinctAscList' cs 1 0 1 - where - l = fromEnum c - fromDistinctAscList' :: Enum a => [a] -> Int -> Int -> Integer -> BitSet a - fromDistinctAscList' [] !n !h !m = BS n n n l h m undefined toEnum - fromDistinctAscList' (c':cs') !n _ !m = - let h' = fromEnum c' in - fromDistinctAscList' cs' (n+1) h' (setBit m (h' - l)) -{-# INLINE fromDistinctAscList #-} - --- | /O(d)/ Insert a single element of type @a@ into the 'BitSet'. Preserves order of 'null' and 'size' -insert :: Enum a => a -> BitSet a -> BitSet a -insert x r@(BS a b c l h m u _) - | m < 0, e < l = r - | m < 0, e > h = r - | b == 0 = singleton x - | a == -1 = r - | e < l = bs (a+1) (b+1) (c+1) e h (shiftL m (l - e) .|. 1) u - | e > h = bs (a+1) (b+1) (c+1) l p (setBit m p) u - | testBit m p = r - | otherwise = bs (a+1) (b+1) (c+1) l h (setBit m p) u - where - e = fromEnum x - p = e - l -{-# INLINE insert #-} - --- | /O(d)/ Delete a single item from the 'BitSet'. Preserves order of 'null' and 'size' -delete :: Enum a => a -> BitSet a -> BitSet a -delete x r@(BS a b c l h m u _) - | m < 0, e < l = bs (a+1) (b+1) (c+1) e h (shiftL m (l - e) .&. Bits.complement 1) u - | m < 0, e > h = bs (a+1) (b+1) (c+1) l p (clearBit m p) u - | b == 0 = r - | a == -1 = pseudoComplement (singleton x) u - | e < l = r - | e > h = r - | testBit m p = bs (a-1) (b-1) (c-1) l h (clearBit m p) u - | otherwise = r - where - e = fromEnum x - p = e - l -{-# INLINE delete #-} - --- | /O(1)/ Test for membership in a 'BitSet' -member :: Enum a => a -> BitSet a -> Bool -member x (BS _ _ _ l h m _ _) - | e < l = m < 0 - | e > h = m > 0 - | otherwise = testBit m (e - l) - where - e = fromEnum x -{-# INLINE member #-} +-- | /O(d * n)/ Make a 'BitSet' from a distinct ascending list of items +fromDistinctAscList :: Enum a => [a] -> BitSet a +fromDistinctAscList [] = empty +fromDistinctAscList (c:cs) = fromDistinctAscList' cs 1 0 1 + where + l = fromEnum c + fromDistinctAscList' :: Enum a => [a] -> Int -> Int -> Integer -> BitSet a + fromDistinctAscList' [] !n !h !m = BS n n n l h m undefined toEnum + fromDistinctAscList' (c':cs') !n _ !m = + let h' = fromEnum c' in + fromDistinctAscList' cs' (n+1) h' (setBit m (h' - l)) +{-# INLINE fromDistinctAscList #-} + +-- | /O(d)/ Insert a single element of type @a@ into the 'BitSet'. Preserves order of 'null' and 'size' +insert :: Enum a => a -> BitSet a -> BitSet a +insert x r@(BS a b c l h m u _) + | m < 0, e < l = r + | m < 0, e > h = r + | b == 0 = singleton x + | a == -1 = r + | e < l = bs (a+1) (b+1) (c+1) e h (shiftL m (l - e) .|. 1) u + | e > h = bs (a+1) (b+1) (c+1) l p (setBit m p) u + | testBit m p = r + | otherwise = bs (a+1) (b+1) (c+1) l h (setBit m p) u + where + e = fromEnum x + p = e - l +{-# INLINE insert #-} + +-- | /O(d)/ Delete a single item from the 'BitSet'. Preserves order of 'null' and 'size' +delete :: Enum a => a -> BitSet a -> BitSet a +delete x r@(BS a b c l h m u _) + | m < 0, e < l = bs (a+1) (b+1) (c+1) e h (shiftL m (l - e) .&. complement 1) u + | m < 0, e > h = bs (a+1) (b+1) (c+1) l p (clearBit m p) u + | b == 0 = r + | a == -1 = pseudoComplement (singleton x) u + | e < l = r + | e > h = r + | testBit m p = bs (a-1) (b-1) (c-1) l h (clearBit m p) u + | otherwise = r + where + e = fromEnum x + p = e - l +{-# INLINE delete #-} + +-- | /O(1)/ Test for membership in a 'BitSet' +member :: Enum a => a -> BitSet a -> Bool +member x (BS _ _ _ l h m _ _) + | e < l = m < 0 + | e > h = m > 0 + | otherwise = testBit m (e - l) + where + e = fromEnum x +{-# INLINE member #-} + +-- | /O(d)/ convert to an Integer representation. Discards negative elements +toInteger :: BitSet a -> Integer +toInteger x = mantissa x `shift` exponent x +{-# INLINE toInteger #-} hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 218 --- | /O(d)/ convert to an Integer representation. Discards negative elements -toInteger :: BitSet a -> Integer -toInteger x = mantissa x `shift` exponent x -{-# INLINE toInteger #-} - --- | /O(d)/. -union :: Enum a => BitSet a -> BitSet a -> BitSet a -union x@(BS a b c l h m u f) y@(BS a' b' c' l' h' m' u' _) - | l' < l = union y x -- ensure left side has lower exponent - | b == 0 = y -- fast empty union - | b' == 0 = x -- fast empty union - | a == -1 = entire u -- fast full union, recomplement obligation met by negative size - | a' == -1 = entire u' -- fast full union, recomplement obligation met by negative size - | m < 0, m' < 0 = recomplement (intersection (recomplement x) (recomplement y)) -- appeal to intersection, recomplement obligation met by 2s complement - | m' < 0 = recomplement (diff (recomplement y) x u') -- union with complement, recomplement obligation met by 2s complement - | m < 0 = recomplement (diff (recomplement x) y u) -- union with complement, recomplement obligation met by 2s complement - | h < l' = bs (a + a') (b + b') (c + c') l h' m'' u -- disjoint positive ranges - | otherwise = bs (a `max` a') (b + b') (recount m'') l (h `max` h') m'' u -- overlapped positives - where - m'' = m .|. shiftL m' (l' - l) - entire u'' = BS (-1) (-1) (-1) 0 0 (-1) u'' f +-- | /O(d)/. +union :: Enum a => BitSet a -> BitSet a -> BitSet a +union x@(BS a b c l h m u f) y@(BS a' b' c' l' h' m' u' _) + | l' < l = union y x -- ensure left side has lower exponent + | b == 0 = y -- fast empty union + | b' == 0 = x -- fast empty union + | a == -1 = entire u -- fast full union, recomplement obligation met by negative size + | a' == -1 = entire u' -- fast full union, recomplement obligation met by negative size + | m < 0, m' < 0 = recomplement (intersection (recomplement x) (recomplement y)) -- appeal to intersection, recomplement obligation met by 2s complement + | m' < 0 = recomplement (diff (recomplement y) x u') -- union with complement, recomplement obligation met by 2s complement + | m < 0 = recomplement (diff (recomplement x) y u) -- union with complement, recomplement obligation met by 2s complement + | h < l' = bs (a + a') (b + b') (c + c') l h' m'' u -- disjoint positive ranges + | otherwise = bs (a `max` a') (b + b') (recount m'') l (h `max` h') m'' u -- overlapped positives + where + m'' = m .|. shiftL m' (l' - l) + entire u'' = BS (-1) (-1) (-1) 0 0 (-1) u'' f + +-- | /O(1)/ Check to see if we are represented as a complemented 'BitSet'. +isComplemented :: Enum a => BitSet a -> Bool +isComplemented = (<0) . mantissa +{-# INLINE isComplemented #-} hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 240 --- | /O(1)/ Check to see if we are represented as a complemented 'BitSet'. -isComplemented :: Enum a => BitSet a -> Bool -isComplemented = (<0) . mantissa -{-# INLINE isComplemented #-} - --- | /O(d)/ -intersection :: Enum a => BitSet a -> BitSet a -> BitSet a -intersection x@(BS a b _ l h m u _) y@(BS a' b' _ l' h' m' u' _) - | l' < l = intersection y x - | b == 0 = empty - | b' == 0 = empty - | a == -1 = y - | a' == -1 = x - | m < 0, m' < 0 = recomplement (union (recomplement x) (recomplement y)) - | m' < 0 = diff x (recomplement y) u' - | m < 0 = diff y (recomplement x) u - | h < l' = empty - | otherwise = bs 0 (b `min` b') (recount m'') l'' (h `min` h') m'' u - where - l'' = max l l' - m'' = shift m (l'' - l) .&. shift m' (l'' - l') - --- | Unsafe internal method for computing differences in a known universe of discourse. --- --- Preconditions: --- --- (1) @m >= 0@ --- 2 @m' >= 0@ --- 3 @a /= -1@ --- 4 @a' /= -1@ --- 5 @b /= 0@ --- 6 @b' /= 0@ --- 7 @u''@ is a previously obtained copy of @(fromEnum minBound, fromEnum maxBound)@ --- -diff :: Enum a => BitSet a -> BitSet a -> (Int,Int) -> BitSet a -diff x@(BS a _ _ l h m _ _) (BS _ b' _ l' h' m' _ _) u'' - | h < l' = x - | h' < l = x - | otherwise = bs (max (a - b') 0) a (recount m'') l h m'' u'' - where - m'' = m .&. shift (Bits.complement m') (l' - l) -{-# INLINE diff #-} - --- | /O(d)/ Remove all elements present in the second bitset from the first -difference :: Enum a => BitSet a -> BitSet a -> BitSet a -difference x@(BS a b _ _ _ m u _) y@(BS a' b' _ _ _ m' _ _) - | a == -1 = pseudoComplement y u - | a' == -1 = empty - | b == 0 = empty - | b' == 0 = x - | m < 0, m' < 0 = diff (recomplement y) (recomplement x) u - | m < 0 = pseudoComplement (recomplement x `union` y) u - | m' < 0 = x `union` recomplement y - | otherwise = diff x y u - --- | /O(d)/ Infix 'difference' -(\\) :: Enum a => BitSet a -> BitSet a -> BitSet a -(\\) = difference -{-# INLINE (\\) #-} - -instance Eq (BitSet a) where - x@(BS _ _ _ l _ m u _) == y@(BS _ _ _ l' _ m' _ _) - | signum m == signum m' = shift m (l - l'') == shift m' (l' - l'') - | m' < 0 = y == x - | otherwise = mask .&. shift m (l - ul) == shift m' (l - ul) - where - l'' = min l l' - mask = setBit 0 (uh - ul + 1) - 1 - ul = fst u - uh = snd u - -instance (Enum a, Bounded a) => Bounded (BitSet a) where - minBound = empty - maxBound = result where - result = BS n n n l h m (l,h) toEnum - n = h - l + 1 - l = fromEnum (minBound `asArgTypeOf` result) - h = fromEnum (maxBound `asArgTypeOf` result) - m = setBit 0 n - 1 +-- | /O(d)/ +intersection :: Enum a => BitSet a -> BitSet a -> BitSet a +intersection x@(BS a b _ l h m u _) y@(BS a' b' _ l' h' m' u' _) + | l' < l = intersection y x + | b == 0 = empty + | b' == 0 = empty + | a == -1 = y + | a' == -1 = x + | m < 0, m' < 0 = recomplement (union (recomplement x) (recomplement y)) + | m' < 0 = diff x (recomplement y) u' + | m < 0 = diff y (recomplement x) u + | h < l' = empty + | otherwise = bs 0 (b `min` b') (recount m'') l'' (h `min` h') m'' u + where + l'' = max l l' + m'' = shift m (l'' - l) .&. shift m' (l'' - l') + +-- | Unsafe internal method for computing differences in a known universe of discourse. +-- +-- Preconditions: +-- +-- (1) @m >= 0@ +-- 2 @m' >= 0@ +-- 3 @a /= -1@ +-- 4 @a' /= -1@ +-- 5 @b /= 0@ +-- 6 @b' /= 0@ +-- 7 @u''@ is a previously obtained copy of @(fromEnum minBound, fromEnum maxBound)@ +-- +diff :: Enum a => BitSet a -> BitSet a -> (Int,Int) -> BitSet a +diff x@(BS a _ _ l h m _ _) (BS _ b' _ l' h' m' _ _) u'' + | h < l' = x + | h' < l = x + | otherwise = bs (max (a - b') 0) a (recount m'') l h m'' u'' + where + m'' = m .&. shift (complement m') (l' - l) +{-# INLINE diff #-} + +-- | /O(d)/ Remove all elements present in the second bitset from the first +difference :: Enum a => BitSet a -> BitSet a -> BitSet a +difference x@(BS a b _ _ _ m u _) y@(BS a' b' _ _ _ m' _ _) + | a == -1 = pseudoComplement y u + | a' == -1 = empty + | b == 0 = empty + | b' == 0 = x + | m < 0, m' < 0 = diff (recomplement y) (recomplement x) u + | m < 0 = pseudoComplement (recomplement x `union` y) u + | m' < 0 = x `union` recomplement y + | otherwise = diff x y u + +-- | /O(d)/ Infix 'difference' +(\\) :: Enum a => BitSet a -> BitSet a -> BitSet a +(\\) = difference +{-# INLINE (\\) #-} + +instance Eq (BitSet a) where + x@(BS _ _ _ l _ m u _) == y@(BS _ _ _ l' _ m' _ _) + | signum m == signum m' = shift m (l - l'') == shift m' (l' - l'') + | m' < 0 = y == x + | otherwise = mask .&. shift m (l - ul) == shift m' (l - ul) + where + l'' = min l l' + mask = setBit 0 (uh - ul + 1) - 1 + ul = fst u + uh = snd u + +instance (Enum a, Bounded a) => Bounded (BitSet a) where + minBound = empty + maxBound = result where + result = BS n n n l h m (l,h) toEnum + n = h - l + 1 + l = fromEnum (minBound `asArgTypeOf` result) + h = fromEnum (maxBound `asArgTypeOf` result) + m = setBit 0 n - 1 + +-- | Utility function to avoid requiring ScopedTypeVariables +asArgTypeOf :: a -> f a -> a +asArgTypeOf = const +{-# INLINE asArgTypeOf #-} hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 320 --- | Utility function to avoid requiring ScopedTypeVariables -asArgTypeOf :: a -> f a -> a -asArgTypeOf = const -{-# INLINE asArgTypeOf #-} - --- | /O(d)/ -recount :: Integer -> Int -recount !n - | n < 0 = Bits.complement (recount (Bits.complement n)) - | otherwise = recount' 0 0 - where - h = hwm n - recount' !i !c - | i > h = c - | otherwise = recount' (i+1) (if testBit n i then c+1 else c) - --- | /O(d)/. Computes the equivalent of (truncate . logBase 2 . abs) extended with 0 at 0 -hwm :: Integer -> Int -hwm !n - | n < 0 = hwm (-n) - | n > 1 = scan p (2*p) - | otherwise = 0 - where - p = probe 1 - -- incrementally compute 2^(2^(i+1)) until it exceeds n - probe :: Int -> Int - probe !i - | bit (2*i) > n = i - | otherwise = probe (2*i) - - -- then scan the powers for the highest set bit - scan :: Int -> Int -> Int - scan !l !h - | l == h = l - | bit (m+1) > n = scan l m - | otherwise = scan (m+1) h - where - m = l + (h - l) `div` 2 - -instance Show a => Show (BitSet a) where - showsPrec d x@(BS _ _ _ _ _ m u _) - | m < 0 = showParen (d > 10) $ showString "pseudoComplement " . showsPrec 11 (recomplement x) . showString " " . showsPrec 11 u - | otherwise = showParen (d > 10) $ showString "fromDistinctAscList " . showsPrec 11 (toList x) - -instance (Enum a, Read a) => Read (BitSet a) where - readPrec = parens $ complemented +++ normal where - complemented = prec 10 $ do - Ident "pseudoComplement" <- lexP - x <- step readPrec - pseudoComplement x `fmap` step readPrec - normal = prec 10 $ do - Ident "fromDistinctAscList" <- lexP - fromDistinctAscList `fmap` step readPrec - --- note that operations on values generated by toEnum are pretty slow because the bounds are suboptimal -instance (Enum a, Bounded a) => Enum (BitSet a) where - fromEnum b@(BS _ _ _ l _ m _ _) = fromInteger (shiftL m (l - l')) - where - l' = fromEnum (minBound `asArgTypeOf` b) - toEnum i = result - where - result = BS a i (recount m) l h m undefined toEnum -- n <= 2^n, so i serves as a valid upper bound - l = fromEnum (minBound `asArgTypeOf` result) - h = fromEnum (maxBound `asArgTypeOf` result) - m = fromIntegral i - a | m /= 0 = 1 -- allow a fast null check, but not much else - | otherwise = 0 - -instance Foldable BitSet where - fold = fold . toList - foldMap f = foldMap f . toList - foldr f z = foldr f z . toList - foldl f z = foldl f z . toList - foldr1 f = foldr1 f . toList - foldl1 f = foldl1 f . toList - -instance Enum a => Monoid (BitSet a) where - mempty = empty - mappend = union +-- | /O(d)/ +recount :: Integer -> Int +recount !n + | n < 0 = complement (recount (complement n)) + | otherwise = recount' 0 0 + where + h = hwm n + recount' !i !c + | i > h = c + | otherwise = recount' (i+1) (if testBit n i then c+1 else c) + +-- | /O(d)/. Computes the equivalent of (truncate . logBase 2 . abs) extended with 0 at 0 +hwm :: Integer -> Int +hwm !n + | n < 0 = hwm (-n) + | n > 1 = scan p (2*p) + | otherwise = 0 + where + p = probe 1 + -- incrementally compute 2^(2^(i+1)) until it exceeds n + probe :: Int -> Int + probe !i + | bit (2*i) > n = i + | otherwise = probe (2*i) + + -- then scan the powers for the highest set bit + scan :: Int -> Int -> Int + scan !l !h + | l == h = l + | bit (m+1) > n = scan l m + | otherwise = scan (m+1) h + where + m = l + (h - l) `div` 2 + +instance Show a => Show (BitSet a) where + showsPrec d x@(BS _ _ _ _ _ m u _) + | m < 0 = showParen (d > 10) $ showString "pseudoComplement " . showsPrec 11 (recomplement x) . showString " " . showsPrec 11 u + | otherwise = showParen (d > 10) $ showString "fromDistinctAscList " . showsPrec 11 (toList x) + +instance (Enum a, Read a) => Read (BitSet a) where + readPrec = parens $ complemented +++ normal where + complemented = prec 10 $ do + Ident "pseudoComplement" <- lexP + x <- step readPrec + pseudoComplement x `fmap` step readPrec + normal = prec 10 $ do + Ident "fromDistinctAscList" <- lexP + fromDistinctAscList `fmap` step readPrec + +-- note that operations on values generated by toEnum are pretty slow because the bounds are suboptimal +instance (Enum a, Bounded a) => Enum (BitSet a) where + fromEnum b@(BS _ _ _ l _ m _ _) = fromInteger (shiftL m (l - l')) + where + l' = fromEnum (minBound `asArgTypeOf` b) + toEnum i = result + where + result = BS a i (recount m) l h m undefined toEnum -- n <= 2^n, so i serves as a valid upper bound + l = fromEnum (minBound `asArgTypeOf` result) + h = fromEnum (maxBound `asArgTypeOf` result) + m = fromIntegral i + a | m /= 0 = 1 -- allow a fast null check, but not much else + | otherwise = 0 + +instance Foldable BitSet where + fold = fold . toList + foldMap f = foldMap f . toList + foldr f z = foldr f z . toList + foldl f z = foldl f z . toList + foldr1 f = foldr1 f . toList + foldl1 f = foldl1 f . toList + +instance Enum a => Monoid (BitSet a) where + mempty = empty + mappend = union + +instance Enum a => Reducer a (BitSet a) where + unit = singleton + snoc = flip insert + cons = insert hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 400 -instance Enum a => Reducer a (BitSet a) where - unit = singleton - snoc = flip insert - cons = insert - -instance (Bounded a, Enum a) => Multiplicative (BitSet a) where - one = full - times = intersection +instance (Bounded a, Enum a) => Multiplicative (BitSet a) where + one = full + times = intersection + +instance (Bounded a, Enum a) => Ringoid (BitSet a) +instance (Bounded a, Enum a) => LeftSemiNearRing (BitSet a) +instance (Bounded a, Enum a) => RightSemiNearRing (BitSet a) +instance (Bounded a, Enum a) => SemiRing (BitSet a) hunk ./doc/html/monoids/src/Data-Ring-Semi-BitSet.html 409 -instance (Bounded a, Enum a) => Ringoid (BitSet a) -instance (Bounded a, Enum a) => LeftSemiNearRing (BitSet a) -instance (Bounded a, Enum a) => RightSemiNearRing (BitSet a) -instance (Bounded a, Enum a) => SemiRing (BitSet a) - --- idempotent monoid -instance Enum a => LeftModule Natural (BitSet a) where - 0 *. _ = empty - _ *. m = m -instance Enum a => RightModule Natural (BitSet a) where - _ .* 0 = empty - m .* _ = m -instance Enum a => Module Natural (BitSet a) - -instance (Bounded a, Enum a) => LeftModule (BitSet a) (BitSet a) where (*.) = times -instance (Bounded a, Enum a) => RightModule (BitSet a) (BitSet a) where (.*) = times -instance (Bounded a, Enum a) => Module (BitSet a) (BitSet a) - -instance (Bounded a, Enum a) => RAlgebra Natural (BitSet a) - -instance Generator (BitSet a) where - type Elem (BitSet a) = a - mapReduce f = mapReduce f . toList +-- idempotent monoid +instance Enum a => Module Natural (BitSet a) +instance Enum a => LeftModule Natural (BitSet a) where + 0 *. _ = empty + _ *. m = m +instance Enum a => RightModule Natural (BitSet a) where + _ .* 0 = empty + m .* _ = m +instance Enum a => Bimodule Natural (BitSet a) +instance (Bounded a, Enum a) => Algebra Natural (BitSet a) + +instance (Bounded a, Enum a) => Module (BitSet a) (BitSet a) +instance (Bounded a, Enum a) => LeftModule (BitSet a) (BitSet a) where (*.) = times +instance (Bounded a, Enum a) => RightModule (BitSet a) (BitSet a) where (.*) = times +instance (Bounded a, Enum a) => Bimodule (BitSet a) (BitSet a) +instance (Bounded a, Enum a) => Algebra (BitSet a) (BitSet a) + +instance Generator (BitSet a) where + type Elem (BitSet a) = a + mapReduce f = mapReduce f . toList + +instance (Show a, Bounded a, Enum a) => Num (BitSet a) where + (+) = union + (-) = difference + (*) = intersection + fromInteger m = r where + r = BS c c c 0 (hwm m) m u toEnum where + c = recount m + u = (fromEnum (minBound `asArgTypeOf` r), fromEnum (maxBound `asArgTypeOf` r)) + abs b | mantissa b < 0 = recomplement b + | otherwise = b + signum = error "BitSet.signum undefined" + +instance (Show a, Bounded a, Enum a) => Bits (BitSet a) where + (.&.) = intersection + (.|.) = union + a `xor` b = (a .|. b) .&. complement (a .&. b) + + -- | /O(d)/ Complements a 'BitSet' with respect to the bounds of @a@. Preserves order of 'null' and 'size' + complement r@(BS a b c l h m _ _) = BS (complement b) (complement a) (complement c) l h (complement m) u toEnum where + u = (fromEnum (minBound `asArgTypeOf` r), fromEnum (maxBound `asArgTypeOf` r)) + {-# INLINE complement #-} + {- + shift (BS a b c l h m _ f) n = BS a b c ((l + r) `max` uh) ((h + r) `max` uh) m (ul,uh) toEnum) where + ul = fromEnum (minBound `asArgTypeOf` r) + uh = fromEnum (maxBound `asArgTypeOf` r) + -} + shift = error "BitSet.shift undefined" + rotate = error "BitSet.rotate undefined" + bit = singleton . toEnum + setBit s b = s `union` singleton (toEnum b) + clearBit s b = s `difference` singleton (toEnum b) + complementBit s b = s `xor` singleton (toEnum b) + testBit s b = member (toEnum b) s + bitSize r = fromEnum (maxBound `asArgTypeOf` r) - fromEnum (minBound `asArgTypeOf` r) + isSigned _ = True + +complement' :: (Bounded a, Enum a) => BitSet a -> BitSet a +complement' r@(BS a b c l h m _ _) = BS (complement b) (complement a) (complement c) l h (complement m) u toEnum where + u = (fromEnum (minBound `asArgTypeOf` r), fromEnum (maxBound `asArgTypeOf` r)) hunk ./doc/html/monoids/src/Data-Ring-Semi-Kleene.html 10 - ( module Data.Ring.Semi + ( module Data.Ring hunk ./doc/html/monoids/src/Data-Ring-Semi-Kleene.html 15 -import Data.Ring.Semi +import Data.Ring hunk ./doc/html/monoids/src/Data-Ring-Semi-Natural.html 26 - ( module Data.Ring.Semi + ( module Data.Ring hunk ./doc/html/monoids/src/Data-Ring-Semi-Natural.html 28 - , natural - ) where - -import Prelude hiding (id,(.)) -import Numeric (readDec, showInt) -import Control.Applicative -import Control.Monad -import Data.Ring.Semi -import qualified Data.Monoid.Combinators as Monoid --- import Data.Word -import Data.Monoid.Monad -import Data.Monoid.Applicative -import Data.Monoid.Multiplicative -import Data.Monoid.Categorical -import Data.Monoid.Self -import Data.Monoid.FromString + , toNatural + , fromNatural + ) where + +import Prelude hiding (id,(.)) +import Numeric (readDec, showInt) +import Control.Applicative +import Control.Monad +import Data.Ring +import qualified Data.Monoid.Combinators as Monoid +-- import Data.Word +import Data.Monoid.Monad +import Data.Monoid.Applicative +import Data.Monoid.Multiplicative +import Data.Monoid.Categorical +import Data.Monoid.Self hunk ./doc/html/monoids/src/Data-Ring-Semi-Natural.html 47 -import Data.Generator.Compressive.RLE -import Data.Sequence (Seq) - -natural :: Integer -> Natural -natural = fromInteger - -newtype Natural = Natural { getNatural :: Integer } - deriving (Eq,Ord) - -instance Read Natural where - readsPrec = const readDec - -instance Show Natural where - showsPrec = const showInt - -instance Num Natural where - Natural a + Natural b = Natural (a + b) - Natural a - Natural b = fromInteger (a - b) - Natural a * Natural b = Natural (a * b) - abs = id - signum = Natural . signum . getNatural - fromInteger x | x < 0 = error "Natural < 0" - | otherwise = Natural x - negate 0 = 0 - negate _ = error "Natural < 0" + +#ifdef M_CONTAINERS +-- used with Seq +import Data.Generator.Compressive.RLE +import Data.Sequence (Seq) +#endif + +#ifdef X_OverloadedStrings +import Data.Monoid.FromString +#endif + +toNatural :: Integer -> Natural +toNatural = fromInteger + +fromNatural :: Ringoid r => Natural -> r +fromNatural = Monoid.replicate one . getNatural + +newtype Natural = Natural { getNatural :: Integer } + deriving (Eq,Ord) + +instance Read Natural where + readsPrec = const readDec + +instance Show Natural where + showsPrec = const showInt hunk ./doc/html/monoids/src/Data-Ring-Semi-Natural.html 73 -instance Enum Natural where - succ (Natural n) = Natural (n + 1) - pred (Natural 0) = error "Natural < 0" - pred (Natural n) = Natural (n - 1) - toEnum n | n < 0 = error "Natural < 0" - toEnum n = Natural (fromIntegral n) - fromEnum = fromIntegral - enumFrom (Natural n) = Natural `map` enumFrom n - enumFromThen (Natural n) (Natural np) - | np < n = Natural `map` enumFromThenTo n np 0 - | otherwise = Natural `map` enumFromThen n np - enumFromTo (Natural n) (Natural m) = Natural `map` enumFromTo n m - enumFromThenTo (Natural n) (Natural m) (Natural o) = Natural `map` enumFromThenTo n m o - -instance Real Natural where - toRational = toRational . getNatural - -instance Integral Natural where - toInteger = getNatural - Natural a `quot` Natural b = Natural (a `quot` b) - Natural a `rem` Natural b = Natural (a `rem` b) - Natural a `div` Natural b = Natural (a `div` b) - Natural a `mod` Natural b = Natural (a `mod` b) - Natural a `quotRem` Natural b = (Natural q,Natural r) where ~(q,r) = a `quotRem` b - Natural a `divMod` Natural b = (Natural q,Natural r) where ~(q,r) = a `divMod` b - -instance Monoid Natural where - mempty = 0 - mappend = (+) - -instance Multiplicative Natural where - one = 1 - times = (*) - -instance Ringoid Natural -instance LeftSemiNearRing Natural -instance RightSemiNearRing Natural -instance SemiRing Natural - -instance LeftModule Natural () where _ *. _ = () -instance RightModule Natural () where _ .* _ = () -instance Module Natural () - --- idempotent monoids -instance LeftModule Natural Any where - 0 *. _ = mempty - _ *. m = m -instance RightModule Natural Any where - _ .* 0 = mempty - m .* _ = m -instance Module Natural Any - -instance LeftModule Natural All where - 0 *. _ = mempty - _ *. m = m -instance RightModule Natural All where - _ .* 0 = mempty - m .* _ = m -instance Module Natural All - -instance LeftModule Natural (First a) where - 0 *. _ = mempty - _ *. m = m -instance RightModule Natural (First a) where - _ .* 0 = mempty - m .* _ = m -instance Module Natural (First a) - -instance LeftModule Natural (Last a) where - 0 *. _ = mempty - _ *. m = m -instance RightModule Natural (Last a) where - _ .* 0 = mempty - m .* _ = m -instance Module Natural (Last a) - -instance LeftModule Natural Ordering where - 0 *. _ = mempty - _ *. m = m -instance RightModule Natural Ordering where - _ .* 0 = mempty - m .* _ = m -instance Module Natural Ordering - --- other monoids - -instance LeftModule Natural [a] where (*.) = flip Monoid.replicate -instance RightModule Natural [a] where (.*) = Monoid.replicate -instance Module Natural [a] - -instance Monoid m => LeftModule Natural (a -> m) where (*.) = flip Monoid.replicate -instance Monoid m => RightModule Natural (a -> m) where (.*) = Monoid.replicate -instance Monoid m => Module Natural (a -> m) - -instance Num a => LeftModule Natural (Sum a) where (*.) = flip Monoid.replicate -instance Num a => RightModule Natural (Sum a) where (.*) = Monoid.replicate -instance Num a => Module Natural (Sum a) - -instance Num a => LeftModule Natural (Product a) where (*.) = flip (.*) -instance Num a => RightModule Natural (Product a) where Product m .* Natural n = Product (m ^ n) -instance Num a => Module Natural (Product a) - -instance LeftModule Natural (Endo a) where (*.) = flip Monoid.replicate -instance RightModule Natural (Endo a) where (.*) = Monoid.replicate -instance Module Natural (Endo a) - -instance Monoid m => LeftModule Natural (Dual m) where (*.) = flip Monoid.replicate -instance Monoid m => RightModule Natural (Dual m) where (.*) = Monoid.replicate -instance Monoid m => Module Natural (Dual m) - --- FromString -instance Monoid m => LeftModule Natural (FromString m) where (*.) = flip Monoid.replicate -instance Monoid m => RightModule Natural (FromString m) where (.*) = Monoid.replicate -instance Monoid m => Module Natural (FromString m) - --- Self -instance Monoid m => LeftModule Natural (Self m) where (*.) = flip Monoid.replicate -instance Monoid m => RightModule Natural (Self m) where (.*) = Monoid.replicate -instance Monoid m => Module Natural (Self m) - --- Free Generator -instance LeftModule Natural (Free a) where (*.) = flip Monoid.replicate -instance RightModule Natural (Free a) where (.*) = Monoid.replicate -instance Module Natural (Free a) - --- RLE Seq -instance Eq a => LeftModule Natural (RLE Seq a) where (*.) = flip Monoid.replicate -instance Eq a => RightModule Natural (RLE Seq a) where (.*) = Monoid.replicate -instance Eq a => Module Natural (RLE Seq a) - --- Categorical -instance Category k => LeftModule Natural (GEndo k a) where (*.) = flip Monoid.replicate -instance Category k => RightModule Natural (GEndo k a) where (.*) = Monoid.replicate -instance Category k => Module Natural (GEndo k a) - -instance Monoid m => LeftModule Natural (CMonoid m m m) where (*.) = flip Monoid.replicate -instance Monoid m => RightModule Natural (CMonoid m m m) where (.*) = Monoid.replicate -instance Monoid m => Module Natural (CMonoid m m m) - --- Alternative -instance Applicative f => LeftModule Natural (Traversal f) where (*.) = flip Monoid.replicate -instance Applicative f => RightModule Natural (Traversal f) where (.*) = Monoid.replicate -instance Applicative f => Module Natural (Traversal f) - -instance Alternative f => LeftModule Natural (Alt f a) where (*.) = flip Monoid.replicate -instance Alternative f => RightModule Natural (Alt f a) where (.*) = Monoid.replicate -instance Alternative f => Module Natural (Alt f a) - ---instance (Alternative f, Monoid m) => LeftModule Natural (App f m) where (*.) = flip Monoid.replicate ---instance (Alternative f, Monoid m) => RightModule Natural (App f m) where (.*) = Monoid.replicate ---instance (Alternative f, Monoid m) => Module Natural (App f m) - --- Monad -instance Monad f => LeftModule Natural (Action f) where (*.) = flip Monoid.replicate -instance Monad f => RightModule Natural (Action f) where (.*) = Monoid.replicate -instance Monad f => Module Natural (Action f) - -instance MonadPlus f => LeftModule Natural (MonadSum f a) where (*.) = flip Monoid.replicate -instance MonadPlus f => RightModule Natural (MonadSum f a) where (.*) = Monoid.replicate -instance MonadPlus f => Module Natural (MonadSum f a) - ---instance (MonadPlus f, Monoid m) => LeftModule Natural (Mon f m) where (*.) = flip Monoid.replicate ---instance (MonadPlus f, Monoid m) => RightModule Natural (Mon f m) where (.*) = Monoid.replicate ---instance (MonadPlus f, Monoid m) => Module Natural (Mon f m) - --- Lexical -instance LeftModule Natural (SourcePosition f) where - 0 *. _ = mempty - n *. Columns x = Columns (fromIntegral n * x) - n *. Lines l c = Lines (fromIntegral n * l) c - _ *. Pos f l c = Pos f l c - n *. t = Monoid.replicate t n - -instance RightModule Natural (SourcePosition f) where (.*) = flip (*.) -instance Module Natural (SourcePosition f) - -instance CharReducer m => LeftModule Natural (UTF8 m) where (*.) = flip Monoid.replicate -instance CharReducer m => RightModule Natural (UTF8 m) where (.*) = Monoid.replicate -instance CharReducer m => Module Natural (UTF8 m) - -instance Multiplicative m => LeftModule Natural (Log m) where (*.) = flip Monoid.replicate -instance Multiplicative m => RightModule Natural (Log m) where (.*) = Monoid.replicate -instance Multiplicative m => Module Natural (Log m) - +instance Num Natural where + Natural a + Natural b = Natural (a + b) + Natural a - Natural b = fromInteger (a - b) + Natural a * Natural b = Natural (a * b) + abs = id + signum = Natural . signum . getNatural + fromInteger x | x < 0 = error "Natural < 0" + | otherwise = Natural x + negate 0 = 0 + negate _ = error "Natural < 0" + +instance Enum Natural where + succ (Natural n) = Natural (n + 1) + pred (Natural 0) = error "Natural < 0" + pred (Natural n) = Natural (n - 1) + toEnum n | n < 0 = error "Natural < 0" + toEnum n = Natural (fromIntegral n) + fromEnum = fromIntegral + enumFrom (Natural n) = Natural `map` enumFrom n + enumFromThen (Natural n) (Natural np) + | np < n = Natural `map` enumFromThenTo n np 0 + | otherwise = Natural `map` enumFromThen n np + enumFromTo (Natural n) (Natural m) = Natural `map` enumFromTo n m + enumFromThenTo (Natural n) (Natural m) (Natural o) = Natural `map` enumFromThenTo n m o + +instance Real Natural where + toRational = toRational . getNatural + +instance Integral Natural where + toInteger = getNatural + Natural a `quot` Natural b = Natural (a `quot` b) + Natural a `rem` Natural b = Natural (a `rem` b) + Natural a `div` Natural b = Natural (a `div` b) + Natural a `mod` Natural b = Natural (a `mod` b) + Natural a `quotRem` Natural b = (Natural q,Natural r) where ~(q,r) = a `quotRem` b + Natural a `divMod` Natural b = (Natural q,Natural r) where ~(q,r) = a `divMod` b + +instance Monoid Natural where + mempty = 0 + mappend = (+) + +instance Multiplicative Natural where + one = 1 + times = (*) + +instance Ringoid Natural +instance LeftSemiNearRing Natural +instance RightSemiNearRing Natural +instance SemiRing Natural + +instance LeftModule Natural () where _ *. _ = () +instance RightModule Natural () where _ .* _ = () +instance Module Natural () + +-- idempotent monoids +instance LeftModule Natural Any where + 0 *. _ = mempty + _ *. m = m +instance RightModule Natural Any where + _ .* 0 = mempty + m .* _ = m +instance Module Natural Any + +instance LeftModule Natural All where + 0 *. _ = mempty + _ *. m = m +instance RightModule Natural All where + _ .* 0 = mempty + m .* _ = m +instance Module Natural All + +instance LeftModule Natural (First a) where + 0 *. _ = mempty + _ *. m = m +instance RightModule Natural (First a) where + _ .* 0 = mempty + m .* _ = m +instance Module Natural (First a) + +instance LeftModule Natural (Last a) where + 0 *. _ = mempty + _ *. m = m +instance RightModule Natural (Last a) where + _ .* 0 = mempty + m .* _ = m +instance Module Natural (Last a) + +instance LeftModule Natural Ordering where + 0 *. _ = mempty + _ *. m = m +instance RightModule Natural Ordering where + _ .* 0 = mempty + m .* _ = m +instance Module Natural Ordering + +-- other monoids + +instance LeftModule Natural [a] where (*.) = flip Monoid.replicate +instance RightModule Natural [a] where (.*) = Monoid.replicate +instance Module Natural [a] + +instance Monoid m => LeftModule Natural (a -> m) where (*.) = flip Monoid.replicate +instance Monoid m => RightModule Natural (a -> m) where (.*) = Monoid.replicate +instance Monoid m => Module Natural (a -> m) + +instance Num a => LeftModule Natural (Sum a) where (*.) = flip Monoid.replicate +instance Num a => RightModule Natural (Sum a) where (.*) = Monoid.replicate +instance Num a => Module Natural (Sum a) + +instance Num a => LeftModule Natural (Product a) where (*.) = flip (.*) +instance Num a => RightModule Natural (Product a) where Product m .* Natural n = Product (m ^ n) +instance Num a => Module Natural (Product a) + +instance LeftModule Natural (Endo a) where (*.) = flip Monoid.replicate +instance RightModule Natural (Endo a) where (.*) = Monoid.replicate +instance Module Natural (Endo a) + +instance Monoid m => LeftModule Natural (Dual m) where (*.) = flip Monoid.replicate +instance Monoid m => RightModule Natural (Dual m) where (.*) = Monoid.replicate +instance Monoid m => Module Natural (Dual m) + +-- Self +instance Monoid m => LeftModule Natural (Self m) where (*.) = flip Monoid.replicate +instance Monoid m => RightModule Natural (Self m) where (.*) = Monoid.replicate +instance Monoid m => Module Natural (Self m) + +-- Free Generator +instance LeftModule Natural (Free a) where (*.) = flip Monoid.replicate +instance RightModule Natural (Free a) where (.*) = Monoid.replicate +instance Module Natural (Free a) + +-- Categorical +instance Category k => LeftModule Natural (GEndo k a) where (*.) = flip Monoid.replicate +instance Category k => RightModule Natural (GEndo k a) where (.*) = Monoid.replicate +instance Category k => Module Natural (GEndo k a) + +instance Monoid m => LeftModule Natural (CMonoid m m m) where (*.) = flip Monoid.replicate +instance Monoid m => RightModule Natural (CMonoid m m m) where (.*) = Monoid.replicate +instance Monoid m => Module Natural (CMonoid m m m) + +-- Alternative +instance Applicative f => LeftModule Natural (Traversal f) where (*.) = flip Monoid.replicate +instance Applicative f => RightModule Natural (Traversal f) where (.*) = Monoid.replicate +instance Applicative f => Module Natural (Traversal f) + +instance Alternative f => LeftModule Natural (Alt f a) where (*.) = flip Monoid.replicate +instance Alternative f => RightModule Natural (Alt f a) where (.*) = Monoid.replicate +instance Alternative f => Module Natural (Alt f a) + +--instance (Alternative f, Monoid m) => LeftModule Natural (App f m) where (*.) = flip Monoid.replicate +--instance (Alternative f, Monoid m) => RightModule Natural (App f m) where (.*) = Monoid.replicate +--instance (Alternative f, Monoid m) => Module Natural (App f m) + +-- Monad +instance Monad f => LeftModule Natural (Action f) where (*.) = flip Monoid.replicate +instance Monad f => RightModule Natural (Action f) where (.*) = Monoid.replicate +instance Monad f => Module Natural (Action f) + +instance MonadPlus f => LeftModule Natural (MonadSum f a) where (*.) = flip Monoid.replicate +instance MonadPlus f => RightModule Natural (MonadSum f a) where (.*) = Monoid.replicate +instance MonadPlus f => Module Natural (MonadSum f a) + +--instance (MonadPlus f, Monoid m) => LeftModule Natural (Mon f m) where (*.) = flip Monoid.replicate +--instance (MonadPlus f, Monoid m) => RightModule Natural (Mon f m) where (.*) = Monoid.replicate +--instance (MonadPlus f, Monoid m) => Module Natural (Mon f m) + +-- Lexical +instance LeftModule Natural (SourcePosition f) where + 0 *. _ = mempty + n *. Columns x = Columns (fromIntegral n * x) + n *. Lines l c = Lines (fromIntegral n * l) c + _ *. Pos f l c = Pos f l c + n *. t = Monoid.replicate t n + +instance RightModule Natural (SourcePosition f) where (.*) = flip (*.) +instance Module Natural (SourcePosition f) + +instance CharReducer m => LeftModule Natural (UTF8 m) where (*.) = flip Monoid.replicate +instance CharReducer m => RightModule Natural (UTF8 m) where (.*) = Monoid.replicate +instance CharReducer m => Module Natural (UTF8 m) + +instance Multiplicative m => LeftModule Natural (Log m) where (*.) = flip Monoid.replicate +instance Multiplicative m => RightModule Natural (Log m) where (.*) = Monoid.replicate +instance Multiplicative m => Module Natural (Log m) hunk ./doc/html/monoids/src/Data-Ring-Semi-Natural.html 258 --- TODO --- --- Control.Monad.* --- ParsecT --- FingerTree --- Int, Integer, Ratio --- SourcePosition --- Replace Natural here with some other notion of NonNegative a --- Words, Lines, Unspaced, Unlined --- Union/UnionWith, Map, Set, etc. --- Max, Min, MaxPriority, MinPriority idempotent --- BoolRing --- Seq +#ifdef M_CONTAINERS +-- RLE Seq +instance Eq a => LeftModule Natural (RLE Seq a) where (*.) = flip Monoid.replicate +instance Eq a => RightModule Natural (RLE Seq a) where (.*) = Monoid.replicate +instance Eq a => Module Natural (RLE Seq a) +#endif + +#ifdef X_OverloadedStrings +-- FromString +instance Monoid m => LeftModule Natural (FromString m) where (*.) = flip Monoid.replicate +instance Monoid m => RightModule Natural (FromString m) where (.*) = Monoid.replicate +instance Monoid m => Module Natural (FromString m) +#endif + +-- TODO +-- +-- Control.Monad.* +-- ParsecT +-- FingerTree +-- Int, Integer, Ratio +-- SourcePosition +-- Replace Natural here with some other notion of NonNegative a +-- Words, Lines, Unspaced, Unlined +-- Union/UnionWith, Map, Set, etc. +-- Max, Min, MaxPriority, MinPriority idempotent +-- BoolRing +-- Seq hunk ./doc/html/monoids/src/Data-Ring-Semi-Near-Trie.html 11 - ( module Data.Ring.Semi.Near + ( module Data.Ring hunk ./doc/html/monoids/src/Data-Ring-Semi-Near-Trie.html 18 - -import Data.Map (Map) -import qualified Data.Map as Map ---import Data.Monoid.Multiplicative ---import Data.Monoid.Reducer -import Data.Monoid.Union hiding (empty) ---import Data.Ring.Module -import Data.Ring.Semi.Near -import Prelude hiding (null) - -singleton :: (Ord c, c `Reducer` m) => c -> Trie c m -singleton = unit - -empty :: (Ord c, Monoid m) => Trie c m -empty = zero - -null :: Ord c => Trie c m -> Bool -null = Map.null . getUnionWith . children - -data Trie c m = Trie { total :: m, label :: m, children :: UnionWith (Map c) (Trie c m) } - deriving (Eq,Show) - -instance Functor (Trie c) where - fmap f (Trie t e r) = Trie (f t) (f e) (fmap (fmap f) r) +import Data.Map (Map) +import qualified Data.Map as Map +import Data.Monoid.Union hiding (empty) +import Data.Ring +import Prelude hiding (null) + +singleton :: (Ord c, c `Reducer` m) => c -> Trie c m +singleton = unit + +empty :: (Ord c, Monoid m) => Trie c m +empty = zero + +null :: Ord c => Trie c m -> Bool +null = Map.null . getUnionWith . children + +data Trie c m = Trie { total :: m, label :: m, children :: UnionWith (Map c) (Trie c m) } + deriving (Eq,Show) + +instance Functor (Trie c) where + fmap f (Trie t e r) = Trie (f t) (f e) (fmap (fmap f) r) + +instance (Ord c, Monoid m) => Monoid (Trie c m) where + mempty = Trie mempty mempty mempty + Trie x y z `mappend` Trie x' y' z' = Trie (x `mappend` x') (y `mappend` y') (z `mappend` z') hunk ./doc/html/monoids/src/Data-Ring-Semi-Near-Trie.html 43 -instance (Ord c, Monoid m) => Monoid (Trie c m) where - mempty = Trie mempty mempty mempty - Trie x y z `mappend` Trie x' y' z' = Trie (x `mappend` x') (y `mappend` y') (z `mappend` z') - -instance (Ord c, c `Reducer` m) => Reducer c (Trie c m) where - unit c = Trie r zero . UnionWith $ flip Map.singleton (Trie r r zero) c where r = unit c - -{- -instance (Ord c, Eq r, RightSemiNearRing r) => Multiplicative (Trie c r) where - one = Trie one one zero - Trie t e r `times` rhs@(Trie t' e' r') = - Trie (t `times` t') (e `times` e') (r .* rhs `plus` lhs *. r') where - lhs = Trie e e zero `asTypeOf` rhs - -instance (Ord c, Eq r, RightSemiNearRing r) => RightSemiNearRing (Trie c r) - -toList :: (Ord c, c `Reducer` [c]) => Trie c m -> [[c]] -toList = fmap merge . Map.assocs . getUnionWith . children where - merge (k,t) = k `times` toList t --} +instance (Ord c, c `Reducer` m) => Reducer c (Trie c m) where + unit c = Trie r zero . UnionWith $ flip Map.singleton (Trie r r zero) c where r = unit c + +{- +instance (Ord c, Eq r, RightSemiNearRing r) => Multiplicative (Trie c r) where + one = Trie one one zero + Trie t e r `times` rhs@(Trie t' e' r') = + Trie (t `times` t') (e `times` e') (r .* rhs `plus` lhs *. r') where + lhs = Trie e e zero `asTypeOf` rhs + +instance (Ord c, Eq r, RightSemiNearRing r) => RightSemiNearRing (Trie c r) + +toList :: (Ord c, c `Reducer` [c]) => Trie c m -> [[c]] +toList = fmap merge . Map.assocs . getUnionWith . children where + merge (k,t) = k `times` toList t +-} hunk ./doc/html/monoids/src/Data-Ring-Semi-Ord.html 23 - ( module Data.Ring.Semi + ( module Data.Ring hunk ./doc/html/monoids/src/Data-Ring-Semi-Ord.html 28 -import Test.QuickCheck --- import Control.Applicative -import Control.Functor.Pointed -import Data.Ring.Semi -import Data.Monoid.Ord -import Data.Monoid.Reducer - --- | A 'SemiRing' using a type's built-in Bounded instance. -newtype Order a = Order { getOrder :: a } deriving (Eq,Ord,Read,Show,Bounded,Arbitrary,CoArbitrary) +-- import Control.Applicative +import Control.Functor.Pointed +import Data.Ring +import Data.Monoid.Ord +import Data.Monoid.Reducer + +#ifdef M_QUICKCHECK +import Test.QuickCheck +#endif hunk ./doc/html/monoids/src/Data-Ring-Semi-Ord.html 38 -instance (Bounded a, Ord a) => Monoid (Order a) where - mappend = max - mempty = minBound - -instance (Bounded a, Ord a) => Multiplicative (Order a) where - times = min - one = maxBound - -instance (Bounded a, Ord a) => Ringoid (Order a) -instance (Bounded a, Ord a) => RightSemiNearRing (Order a) -instance (Bounded a, Ord a) => LeftSemiNearRing (Order a) -instance (Bounded a, Ord a) => SemiRing (Order a) -instance (Bounded a, Ord a) => Reducer a (Order a) where - unit = Order - -instance Functor Order where - fmap f (Order a) = Order (f a) - -instance Pointed Order where - point = Order - -instance Copointed Order where - extract = getOrder - --- | A 'SemiRing' which adds 'minBound' and 'maxBound' to a pre-existing type. -data Priority a = MinBound | Priority a | MaxBound deriving (Eq,Read,Show) - -instance Bounded (Priority a) where - minBound = MinBound - maxBound = MaxBound +-- | A 'SemiRing' using a type's built-in Bounded instance. +newtype Order a = Order { getOrder :: a } deriving + ( Eq + , Ord + , Read + , Show + , Bounded +#ifdef M_QUICKCHECK + , Arbitrary + , CoArbitrary +#endif + ) + +instance (Bounded a, Ord a) => Monoid (Order a) where + mappend = max + mempty = minBound + +instance (Bounded a, Ord a) => Multiplicative (Order a) where + times = min + one = maxBound + +instance (Bounded a, Ord a) => Ringoid (Order a) +instance (Bounded a, Ord a) => RightSemiNearRing (Order a) +instance (Bounded a, Ord a) => LeftSemiNearRing (Order a) +instance (Bounded a, Ord a) => SemiRing (Order a) +instance (Bounded a, Ord a) => Reducer a (Order a) where + unit = Order + +instance Functor Order where + fmap f (Order a) = Order (f a) hunk ./doc/html/monoids/src/Data-Ring-Semi-Ord.html 69 -instance Ord a => Ord (Priority a) where - MinBound <= _ = True - Priority _ <= MinBound = False - Priority a <= Priority b = a <= b - Priority _ <= MaxBound = True - MaxBound <= MaxBound = True - MaxBound <= _ = False - - MinBound `min` _ = MinBound - _ `min` MinBound = MinBound - Priority a `min` Priority b = Priority (a `min` b) - u `min` MaxBound = u - MaxBound `min` v = v - - MinBound `max` v = v - u `max` MinBound = u - Priority a `max` Priority b = Priority (a `max` b) - _ `max` MaxBound = MaxBound - MaxBound `max` _ = MaxBound - -instance Arbitrary a => Arbitrary (Priority a) where - arbitrary = frequency [ (1 ,return MinBound) - , (10, fmap Priority arbitrary) - , (1 ,return MaxBound) ] - shrink (Priority x) = MinBound : MaxBound : fmap Priority (shrink x) - shrink MinBound = [] - shrink MaxBound = [] - -instance CoArbitrary a => CoArbitrary (Priority a) where - coarbitrary MinBound = variant (0 :: Int) - coarbitrary (Priority a) = variant (1 :: Int) . coarbitrary a - coarbitrary MaxBound = variant (2 :: Int) +instance Pointed Order where + point = Order + +instance Copointed Order where + extract = getOrder + +-- | A 'SemiRing' which adds 'minBound' and 'maxBound' to a pre-existing type. +data Priority a = MinBound | Priority a | MaxBound deriving (Eq,Read,Show) + +instance Bounded (Priority a) where + minBound = MinBound + maxBound = MaxBound + +instance Ord a => Ord (Priority a) where + MinBound <= _ = True + Priority _ <= MinBound = False + Priority a <= Priority b = a <= b + Priority _ <= MaxBound = True + MaxBound <= MaxBound = True + MaxBound <= _ = False + + MinBound `min` _ = MinBound + _ `min` MinBound = MinBound + Priority a `min` Priority b = Priority (a `min` b) + u `min` MaxBound = u + MaxBound `min` v = v + + MinBound `max` v = v + u `max` MinBound = u + Priority a `max` Priority b = Priority (a `max` b) + _ `max` MaxBound = MaxBound + MaxBound `max` _ = MaxBound hunk ./doc/html/monoids/src/Data-Ring-Semi-Ord.html 102 -instance Ord a => Monoid (Priority a) where - mappend = max - mempty = minBound - -instance Ord a => Multiplicative (Priority a) where - times = min - one = maxBound - -instance Ord a => Ringoid (Priority a) -instance Ord a => LeftSemiNearRing (Priority a) -instance Ord a => RightSemiNearRing (Priority a) -instance Ord a => SemiRing (Priority a) - -instance Ord a => Reducer a (Priority a) where - unit = Priority - -instance Ord a => Reducer (MinPriority a) (Priority a) where - unit (MinPriority Nothing) = MaxBound - unit (MinPriority (Just x)) = Priority x - -instance Ord a => Reducer (MaxPriority a) (Priority a) where - unit (MaxPriority Nothing) = MinBound - unit (MaxPriority (Just x)) = Priority x - -instance Functor Priority where - fmap _ MaxBound = MaxBound - fmap f (Priority a) = Priority (f a) - fmap _ MinBound = MinBound - -instance Pointed Priority where - point = Priority +#ifdef M_QUICKCHECK +instance Arbitrary a => Arbitrary (Priority a) where + arbitrary = frequency [ (1 ,return MinBound) + , (10, fmap Priority arbitrary) + , (1 ,return MaxBound) ] + shrink (Priority x) = MinBound : MaxBound : fmap Priority (shrink x) + shrink MinBound = [] + shrink MaxBound = [] + +instance CoArbitrary a => CoArbitrary (Priority a) where + coarbitrary MinBound = variant (0 :: Int) + coarbitrary (Priority a) = variant (1 :: Int) . coarbitrary a + coarbitrary MaxBound = variant (2 :: Int) +#endif + +instance Ord a => Monoid (Priority a) where + mappend = max + mempty = minBound + +instance Ord a => Multiplicative (Priority a) where + times = min + one = maxBound + +instance Ord a => Ringoid (Priority a) +instance Ord a => LeftSemiNearRing (Priority a) +instance Ord a => RightSemiNearRing (Priority a) +instance Ord a => SemiRing (Priority a) + +instance Ord a => Reducer a (Priority a) where + unit = Priority + +instance Ord a => Reducer (MinPriority a) (Priority a) where + unit (MinPriority Nothing) = MaxBound + unit (MinPriority (Just x)) = Priority x + +instance Ord a => Reducer (MaxPriority a) (Priority a) where + unit (MaxPriority Nothing) = MinBound + unit (MaxPriority (Just x)) = Priority x + +instance Functor Priority where + fmap _ MaxBound = MaxBound + fmap f (Priority a) = Priority (f a) + fmap _ MinBound = MinBound + +instance Pointed Priority where + point = Priority hunk ./doc/html/monoids/src/Data-Ring-Semi-Tropical.html 23 - , module Data.Ring.Semi + , module Data.Ring hunk ./doc/html/monoids/src/Data-Ring-Semi-Tropical.html 29 -import Test.QuickCheck -import Control.Functor.Pointed -import Data.Monoid.Reducer (Reducer, unit, Monoid, mappend, mempty) -import Data.Ring.Semi -import Data.Monoid.Ord hiding (infinity) - -infinity :: Tropical a -infinity = Tropical Nothing - --- | The 'SemiRing' @('min','+')@ over @'a' extended with 'infinity'@. --- When @a@ has a Num instance with an addition that respects order, then this is --- transformed into a tropical semiring. It is assumed that 0 is the least element --- of a. --- --- <http://hal.archives-ouvertes.fr/docs/00/11/37/79/PDF/Tropical.pdf> - -newtype Tropical a = Tropical { getTropical :: Maybe a } - deriving (Eq,Show,Read,Arbitrary,CoArbitrary) - -instance Ord a => Ord (Tropical a) where - Tropical Nothing `compare` Tropical Nothing = EQ - Tropical Nothing `compare` _ = GT - _ `compare` Tropical Nothing = LT - Tropical (Just a) `compare` Tropical (Just b) = a `compare` b - -instance Ord a => Monoid (Tropical a) where - mempty = infinity - mappend = min - -instance Ord a => Reducer a (Tropical a) where - unit = Tropical . Just +import Control.Functor.Pointed +import Data.Monoid.Reducer +import Data.Monoid.Combinators as Monoid +import Data.Ring.Semi.Natural +import Data.Ring +import Data.Ring.Module +import Data.Monoid.Ord hiding (infinity) + +#ifdef M_QUICKCHECK +import Test.QuickCheck +#endif + +infinity :: Tropical a +infinity = Tropical Nothing + +-- | The 'SemiRing' @('min','+')@ over @'a' extended with 'infinity'@. +-- When @a@ has a Num instance with an addition that respects order, then this is +-- transformed into a tropical semiring. It is assumed that 0 is the least element +-- of a. +-- +-- <http://hal.archives-ouvertes.fr/docs/00/11/37/79/PDF/Tropical.pdf> + +newtype Tropical a = Tropical { getTropical :: Maybe a } deriving + ( Eq + , Show + , Read +#ifdef M_QUICKCHECK + , Arbitrary + , CoArbitrary +#endif + ) hunk ./doc/html/monoids/src/Data-Ring-Semi-Tropical.html 61 -instance Ord a => Reducer (Maybe a) (Tropical a) where - unit = Tropical - -instance Ord a => Reducer (MinPriority a) (Tropical a) where - unit = Tropical . getMinPriority +instance Ord a => Ord (Tropical a) where + Tropical Nothing `compare` Tropical Nothing = EQ + Tropical Nothing `compare` _ = GT + _ `compare` Tropical Nothing = LT + Tropical (Just a) `compare` Tropical (Just b) = a `compare` b hunk ./doc/html/monoids/src/Data-Ring-Semi-Tropical.html 67 -instance Functor Tropical where - fmap f (Tropical a) = Tropical (fmap f a) - -instance Pointed Tropical where - point = Tropical . Just - -instance Num a => Multiplicative (Tropical a) where - one = point $ fromInteger 0 - Tropical Nothing `times` _ = infinity - Tropical (Just a) `times` Tropical (Just b) = point (a + b) - _ `times` Tropical Nothing = infinity - -instance (Ord a, Num a) => Ringoid (Tropical a) -instance (Ord a, Num a) => LeftSemiNearRing (Tropical a) -instance (Ord a, Num a) => RightSemiNearRing (Tropical a) -instance (Ord a, Num a) => SemiRing (Tropical a) +instance Ord a => Monoid (Tropical a) where + mempty = infinity + mappend = min + +instance Ord a => Reducer a (Tropical a) where + unit = Tropical . Just + +instance Ord a => Reducer (Maybe a) (Tropical a) where + unit = Tropical + +instance Ord a => Reducer (MinPriority a) (Tropical a) where + unit = Tropical . getMinPriority + +instance Functor Tropical where + fmap f (Tropical a) = Tropical (fmap f a) + +instance Pointed Tropical where + point = Tropical . Just + +instance Num a => Multiplicative (Tropical a) where + one = point $ fromInteger 0 + Tropical Nothing `times` _ = infinity + Tropical (Just a) `times` Tropical (Just b) = point (a + b) + _ `times` Tropical Nothing = infinity + +instance (Ord a, Num a) => Ringoid (Tropical a) +instance (Ord a, Num a) => LeftSemiNearRing (Tropical a) +instance (Ord a, Num a) => RightSemiNearRing (Tropical a) +instance (Ord a, Num a) => SemiRing (Tropical a) + +instance (Ord a, Num a) => Module (Tropical a) (Tropical a) +instance (Ord a, Num a) => LeftModule (Tropical a) (Tropical a) where (*.) = times +instance (Ord a, Num a) => RightModule (Tropical a) (Tropical a) where (.*) = times +instance (Ord a, Num a) => Bimodule (Tropical a) (Tropical a) + +instance (Ord a, Num a) => Module Natural (Tropical a) +instance (Ord a, Num a) => LeftModule Natural (Tropical a) where (*.) = flip Monoid.replicate +instance (Ord a, Num a) => RightModule Natural (Tropical a) where (.*) = Monoid.replicate +instance (Ord a, Num a) => Bimodule Natural (Tropical a) hunk ./doc/html/monoids/src/Data-Ring-Sugar.html 27 - , module Data.Ring.Semi.Near - ) where - -import Data.Monoid.Multiplicative.Sugar -import Data.Ring.Semi.Near + , module Data.Ring + , module Data.Ring.Semi.Natural + , (^^) + ) where + +import Prelude hiding ((^^)) +import Data.Monoid.Multiplicative.Sugar +import Data.Group.Combinators as Group +import Data.Ring +import Data.Ring.Semi.Natural + +(^^) :: MultiplicativeGroup r => r -> Integer -> r +r ^^ n = getLog (Group.replicate (Log r) n) + hunk ./doc/html/monoids/src/Data-Ring.html 9 -
    -----------------------------------------------------------------------------
    --- |
    --- Module      :  Data.Ring
    --- Copyright   :  (c) Edward Kmett 2009
    --- License     :  BSD-style
    --- Maintainer  :  ekmett@gmail.com
    --- Stability   :  experimental
    --- Portability :  portable (instances use MPTCs)
    ---
    ------------------------------------------------------------------------------
    -
    -module Data.Ring
    -    ( module Data.Group
    -    , module Data.Ring.Semi
    -    , Ring
    -    ) where
    -
    -import Data.Group
    -import Data.Ring.Semi
    -import Data.Monoid.Self
    -import Data.Monoid.FromString
    -
    -class (Group a, SemiRing a) => Ring a
    -
    -instance Ring r => Ring (Self r)
    -instance Ring r => Ring (FromString r)
    -instance Ring r => Ring (ReducedBy r s)
    -instance Ring r => Ring (Dual r)
    +
    {-# OPTIONS_GHC -fno-warn-orphans #-}
    +{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, UndecidableInstances #-}
    +-----------------------------------------------------------------------------
    +-- |
    +-- Module      :  Data.Ring
    +-- Copyright   :  (c) Edward Kmett 2009
    +-- License     :  BSD-style
    +-- Maintainer  :  ekmett@gmail.com
    +-- Stability   :  experimental
    +-- Portability :  portable (instances use MPTCs)
    +--
    +--
    +-- Defines left- and right- seminearrings. Every 'MonadPlus' wrapped around
    +-- a 'Monoid' qualifies due to the distributivity of (>>=) over 'mplus'.
    +--
    +-- See <http://conway.rutgers.edu/~ccshan/wiki/blog/posts/WordNumbers1/>
    +--
    +-----------------------------------------------------------------------------
    +
    +module Data.Ring
    +    ( module Data.Group
    +    , Ringoid
    +    , LeftSemiNearRing
    +    , RightSemiNearRing
    +    , SemiRing
    +    , Ring
    +    , DivisionRing
    +    , Field
    +    ) where
    +
    +import Data.Group
    +import Data.Monoid.Self
    +
    +#ifdef X_OverloadedStrings
    +import Data.Monoid.FromString
    +#endif
    +
    +#ifdef M_MTL
    +import Control.Monad.Reader
    +import qualified Control.Monad.RWS.Lazy as LRWS
    +import qualified Control.Monad.RWS.Strict as SRWS
    +import qualified Control.Monad.State.Lazy as LState
    +import qualified Control.Monad.State.Strict as SState
    +import qualified Control.Monad.Writer.Lazy as LWriter
    +import qualified Control.Monad.Writer.Strict as SWriter
    +#endif
    +
    +#ifdef M_FINGERTREE
    +import Data.FingerTree
    +#endif
    +
    +#ifdef M_CONTAINERS
    +import qualified Data.Sequence as Seq
    +import Data.Sequence (Seq)
    +#endif
    +
    +#ifdef M_PARSEC
    +import Text.Parsec.Prim
    +#endif
    +
    +#ifdef X_OverloadedStrings
    +import Data.Monoid.FromString
    +#endif
    +
    +-- | @0@ annihilates `times`
    +class (Multiplicative m, Monoid m) => Ringoid m
    +instance Ringoid Integer
    +instance Ringoid Int
    +instance Ringoid m => Ringoid (Self m)
    +instance Ringoid m => Ringoid (Dual m)
    +instance Monoid m => Ringoid [m]
    +instance Monoid m => Ringoid (Maybe m)
    +
    +-- | @a * (b + c) = (a * b) + (a * c)@
    +class Ringoid m => LeftSemiNearRing m 
    +instance LeftSemiNearRing m => LeftSemiNearRing (Self m)
    +instance RightSemiNearRing m => LeftSemiNearRing (Dual m)
    +
    +-- | @(a + b) * c = (a * c) + (b * c)@
    +class Ringoid m => RightSemiNearRing m 
    +instance RightSemiNearRing m => RightSemiNearRing (Self m)
    +instance LeftSemiNearRing m => RightSemiNearRing (Dual m)
    +instance Monoid m => RightSemiNearRing [m]
    +instance Monoid m => RightSemiNearRing (Maybe m)
    +
    +-- | A 'SemiRing' is an instance of both 'Multiplicative' and 'Monoid' where 
    +--   'times' distributes over 'plus'.
    +class (RightSemiNearRing a, LeftSemiNearRing a) => SemiRing a
    +instance SemiRing r => SemiRing (Self r)
    +instance SemiRing r => SemiRing (Dual r)
    +
    +class (Group a, SemiRing a) => Ring a
    +instance Ring r => Ring (Self r)
    +instance Ring r => Ring (Dual r)
    +
    +class (Ring a, MultiplicativeGroup a) => DivisionRing a
    +instance DivisionRing r => DivisionRing (Self r)
    +instance DivisionRing r => DivisionRing (Dual r)
    +
    +class (Ring a, MultiplicativeGroup a) => Field a
    +instance Field f => Field (Dual f)
    +instance Field f => Field (Self f)
    +
    +#ifdef M_REFLECTION
    +instance Ringoid m => Ringoid (ReducedBy m s)
    +instance LeftSemiNearRing m => LeftSemiNearRing (ReducedBy m s)
    +instance RightSemiNearRing m => RightSemiNearRing (ReducedBy m s)
    +instance SemiRing r => SemiRing (ReducedBy r s)
    +instance Ring r => Ring (ReducedBy r s)
    +instance DivisionRing r => DivisionRing (ReducedBy r s)
    +instance Field f => Field (ReducedBy f s)
    +#endif
    +
    +#ifdef M_PARSEC
    +instance (Stream s m t, Monoid a) => Ringoid (ParsecT s u m a)
    +instance (Stream s m t, Monoid a) => RightSemiNearRing (ParsecT s u m a)
    +#endif
    +
    +#ifdef M_MTL
    +instance (MonadPlus m, Monoid n) => Ringoid (SState.StateT s m n)
    +instance (MonadPlus m, Monoid n) => Ringoid (LState.StateT s m n)
    +instance (MonadPlus m, Monoid n) => Ringoid (ReaderT e m n)
    +instance (MonadPlus m, Monoid w, Monoid n) => Ringoid (SRWS.RWST r w s m n)
    +instance (MonadPlus m, Monoid w, Monoid n) => Ringoid (LRWS.RWST r w s m n)
    +instance (MonadPlus m, Monoid w, Monoid n) => Ringoid (SWriter.WriterT w m n)
    +instance (MonadPlus m, Monoid w, Monoid n) => Ringoid (LWriter.WriterT w m n)
    +instance (MonadPlus m, Monoid n) => RightSemiNearRing (SState.StateT s m n)
    +instance (MonadPlus m, Monoid n) => RightSemiNearRing (LState.StateT s m n)
    +instance (MonadPlus m, Monoid n) => RightSemiNearRing (ReaderT e m n)
    +instance (MonadPlus m, Monoid w, Monoid n) => RightSemiNearRing (SRWS.RWST r w s m n)
    +instance (MonadPlus m, Monoid w, Monoid n) => RightSemiNearRing (LRWS.RWST r w s m n)
    +instance (MonadPlus m, Monoid w, Monoid n) => RightSemiNearRing (SWriter.WriterT w m n)
    +instance (MonadPlus m, Monoid w, Monoid n) => RightSemiNearRing (LWriter.WriterT w m n)
    +#endif
    +
    +#ifdef M_FINGERTREE
    +instance (Measured v m, Monoid m) => Ringoid (FingerTree v m)
    +instance (Measured v m, Monoid m) => RightSemiNearRing (FingerTree v m)
    +#endif
    +
    +#ifdef M_CONTAINERS
    +instance Monoid m => Ringoid (Seq m)
    +instance Monoid m => RightSemiNearRing (Seq m)
    +#endif
    +
    +#ifdef X_OverloadedStrings
    +instance Ringoid m => Ringoid (FromString m)
    +instance RightSemiNearRing m => RightSemiNearRing (FromString m)
    +instance LeftSemiNearRing m => LeftSemiNearRing (FromString m)
    +instance SemiRing r => SemiRing (FromString r)
    +instance Ring r => Ring (FromString r)
    +instance DivisionRing r => DivisionRing (FromString r)
    +instance Field f => Field (FromString f)
    +#endif
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 121
    -import Data.Generator.Combinators (Generator,Elem,foldMap, mapReduce)
    -#ifndef __GLASGOW_HASKELL__
    -import Data.Typeable (Typeable, typeOf, typeOfDefault)
    -#endif
    -import Data.Typeable (Typeable1(..), TyCon, mkTyCon, mkTyConApp)
    -import Data.Word
    -import Data.Int
    -
    -{-
    --- just for testing
    -import Test.QuickCheck 
    -import Data.List (nub,sort)
    -import qualified Data.List as List
    --}
    -
    -#if __GLASGOW_HASKELL__
    -import Text.Read
    -import Data.Data (Data(..), mkNorepType, gcast1)
    -#endif
    -
    -{--------------------------------------------------------------------
    -  Operators
    ---------------------------------------------------------------------}
    -infixl 9 \\ --
    -
    --- | /O(n+m)/. See 'difference'.
    -(\\) :: (US a, Ord a) => USet a -> USet a -> USet a
    -m1 \\ m2 = difference m1 m2
    -
    -{--------------------------------------------------------------------
    -  Sets are size balanced trees
    ---------------------------------------------------------------------}
    -type Size     = Int
    -
    --- | A set of values @a@.
    -data Set a    = Tip 
    -              | Bin {-# UNPACK #-} !Size a !(USet a) !(USet a) 
    -
    --- smart unboxed types
    -class US a where
    -    data USet a
    -    view :: USet a -> Set a
    -    {-# INLINE view #-}
    -    tip :: USet a
    -    {-# INLINE tip #-}
    -    bin :: Size -> a -> USet a -> USet a -> USet a
    -    {-# INLINE bin #-}
    -
    +#ifndef __GLASGOW_HASKELL__
    +import Data.Typeable (Typeable, typeOf, typeOfDefault)
    +#endif
    +import Data.Typeable (Typeable1(..), TyCon, mkTyCon, mkTyConApp)
    +import Data.Word
    +import Data.Int
    +
    +{-
    +-- just for testing
    +import Test.QuickCheck 
    +import Data.List (nub,sort)
    +import qualified Data.List as List
    +-}
    +
    +#if __GLASGOW_HASKELL__
    +import Text.Read
    +import Data.Data (Data(..), mkNorepType, gcast1)
    +#endif
    +
    +{--------------------------------------------------------------------
    +  Operators
    +--------------------------------------------------------------------}
    +infixl 9 \\ --
    +
    +-- | /O(n+m)/. See 'difference'.
    +(\\) :: (US a, Ord a) => USet a -> USet a -> USet a
    +m1 \\ m2 = difference m1 m2
    +
    +{--------------------------------------------------------------------
    +  Sets are size balanced trees
    +--------------------------------------------------------------------}
    +type Size     = Int
    +
    +-- | A set of values @a@.
    +data Set a    = Tip 
    +              | Bin {-# UNPACK #-} !Size a !(USet a) !(USet a) 
    +
    +-- smart unboxed types
    +class US a where
    +    data USet a
    +    view :: USet a -> Set a
    +    {-# INLINE view #-}
    +    tip :: USet a
    +    {-# INLINE tip #-}
    +    bin :: Size -> a -> USet a -> USet a -> USet a
    +    {-# INLINE bin #-}
    +    isTip :: USet a -> Bool
    +    {-# INLINE isTip #-}
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 178
    -    mapReduce _ (view -> Tip) = mempty
    +    mapReduce _ (isTip -> True) = mempty
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 207
    -null (view -> Tip) = True
    -null (view -> Bin {}) = False
    +null (view -> Bin {}) = False
    +null _ = True
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 212
    -size (view -> Tip) = 0
    -size (view -> Bin sz _ _ _) = sz
    +size (view -> Bin sz _ _ _) = sz
    +size _ = 0
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 217
    -member x (view -> Tip) = False
    -member x (view -> Bin _ y l r) = 
    -    case compare x y of
    -        LT -> member x l
    -        GT -> member x r
    -        EQ -> True       
    -
    --- | /O(log n)/. Is the element not in the set?
    -notMember :: (US a, Ord a) => a -> USet a -> Bool
    -notMember x t = not $ member x t
    -
    -{--------------------------------------------------------------------
    -  Construction
    ---------------------------------------------------------------------}
    --- | /O(1)/. The empty set.
    -empty :: US a => USet a
    -empty = tip
    -
    --- | /O(1)/. Create a singleton set.
    -singleton :: US a => a -> USet a
    -singleton x = bin 1 x tip tip
    -
    -{--------------------------------------------------------------------
    -  Insertion, Deletion
    ---------------------------------------------------------------------}
    --- | /O(log n)/. Insert an element in a set.
    --- If the set already contains an element equal to the given value,
    --- it is replaced with the new value.
    -insert :: (US a, Ord a) => a -> USet a -> USet a
    -insert x (view -> Tip)          = singleton x
    +member x y = 
    +    case view y of 
    +        Bin _ y l r -> case compare x y of
    +            LT -> member x l
    +            GT -> member x r
    +            EQ -> True       
    +        _ -> False
    +
    +-- | /O(log n)/. Is the element not in the set?
    +notMember :: (US a, Ord a) => a -> USet a -> Bool
    +notMember x t = not $ member x t
    +
    +{--------------------------------------------------------------------
    +  Construction
    +--------------------------------------------------------------------}
    +-- | /O(1)/. The empty set.
    +empty :: US a => USet a
    +empty = tip
    +
    +-- | /O(1)/. Create a singleton set.
    +singleton :: US a => a -> USet a
    +singleton x = bin 1 x tip tip
    +
    +{--------------------------------------------------------------------
    +  Insertion, Deletion
    +--------------------------------------------------------------------}
    +-- | /O(log n)/. Insert an element in a set.
    +-- If the set already contains an element equal to the given value,
    +-- it is replaced with the new value.
    +insert :: (US a, Ord a) => a -> USet a -> USet a
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 251
    -
    --- | /O(log n)/. Delete an element from a set.
    -delete :: (US a, Ord a) => a -> USet a -> USet a
    -delete x (view -> Tip)         = tip
    +insert x _ = singleton x
    +
    +-- | /O(log n)/. Delete an element from a set.
    +delete :: (US a, Ord a) => a -> USet a -> USet a
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 259
    -
    -{--------------------------------------------------------------------
    -  Subset
    ---------------------------------------------------------------------}
    --- | /O(n+m)/. Is this a proper subset? (ie. a subset but not equal).
    -isProperSubsetOf :: (US a, Ord a) => USet a -> USet a -> Bool
    -isProperSubsetOf s1 s2
    -    = (size s1 < size s2) && (isSubsetOf s1 s2)
    +delete x _ = tip
    +
    +{--------------------------------------------------------------------
    +  Subset
    +--------------------------------------------------------------------}
    +-- | /O(n+m)/. Is this a proper subset? (ie. a subset but not equal).
    +isProperSubsetOf :: (US a, Ord a) => USet a -> USet a -> Bool
    +isProperSubsetOf s1 s2 = (size s1 < size s2) && (isSubsetOf s1 s2)
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 274
    -isSubsetOfX (view -> Tip) _         = True
    -isSubsetOfX _ (view -> Tip)         = False
    -isSubsetOfX (view -> Bin _ x l r) t = found && isSubsetOfX l lt && isSubsetOfX r gt
    -  where
    -    (lt,found,gt) = splitMember x t
    +isSubsetOfX _ (isTip -> True)         = False
    +isSubsetOfX (view -> Bin _ x l r) t = found && isSubsetOfX l lt && isSubsetOfX r gt
    +  where
    +    (lt,found,gt) = splitMember x t
    +isSubsetOfX _ _                     = True
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 286
    -findMin (view -> Bin _ x (view -> Tip) _) = x
    +findMin (view -> Bin _ x (isTip -> True) _) = x
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 288
    -findMin (view -> Tip)           = error "Set.findMin: empty set has no minimal element"
    +findMin _ = error "Set.findMin: empty set has no minimal element"
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 292
    -findMax (view -> Bin _ x _ (view -> Tip))  = x
    +findMax (view -> Bin _ x _ (isTip -> True))  = x
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 294
    -findMax (view -> Tip)            = error "Set.findMax: empty set has no maximal element"
    +findMax _ = error "Set.findMax: empty set has no maximal element"
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 298
    -deleteMin (view -> Bin _ _ (view -> Tip) r) = r
    +deleteMin (view -> Bin _ _ (isTip -> True) r) = r
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 300
    -deleteMin (view -> Tip)           = tip
    +deleteMin _ = tip
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 304
    -deleteMax (view -> Bin _ _ l (view -> Tip)) = l
    +deleteMax (view -> Bin _ _ l (isTip -> True)) = l
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 306
    -deleteMax (view -> Tip)           = tip
    +deleteMax _ = tip
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 322
    -union (view -> Tip) t2  = t2
    -union t1 (view -> Tip)  = t1
    +union (isTip -> True) t2  = t2
    +union t1 (isTip -> True)  = t1
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 327
    -hedgeUnion _     _     t1 (view -> Tip)                    = t1
    -hedgeUnion cmplo cmphi (view -> Tip) (view -> Bin _ x l r) = join x (filterGt cmplo l) (filterLt cmphi r)
    +hedgeUnion _     _     t1 (isTip -> True)                    = t1
    +hedgeUnion cmplo cmphi (isTip -> True) (view -> Bin _ x l r) = join x (filterGt cmplo l) (filterLt cmphi r)
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 339
    -difference (view -> Tip) _   = tip
    -difference t1 (view -> Tip)  = t1
    +difference (isTip -> True) _   = tip
    +difference t1 (isTip -> True)  = t1
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 344
    -hedgeDiff _ _ (view -> Tip) _ = tip
    -hedgeDiff cmplo cmphi (view -> Bin _ x l r) (view -> Tip) = join x (filterGt cmplo l) (filterLt cmphi r)
    +hedgeDiff _ _ (isTip -> True) _ = tip
    +hedgeDiff cmplo cmphi (view -> Bin _ x l r) (isTip -> True) = join x (filterGt cmplo l) (filterLt cmphi r)
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 365
    -intersection (view -> Tip) _ = tip
    -intersection _ (view -> Tip) = tip
    +intersection (isTip -> True) _ = tip
    +intersection _ (isTip -> True) = tip
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 386
    -filter _ (view -> Tip) = tip
    -filter p (view -> Bin _ x l r)
    -  | p x       = join x (filter p l) (filter p r)
    -  | otherwise = merge (filter p l) (filter p r)
    +filter p (view -> Bin _ x l r)
    +  | p x       = join x (filter p l) (filter p r)
    +  | otherwise = merge (filter p l) (filter p r)
    +filter _ _ = tip
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 395
    -partition _ (view -> Tip) = (tip,tip)
    -partition p (view -> Bin _ x l r)
    -  | p x       = (join x l1 r1,merge l2 r2)
    -  | otherwise = (merge l1 r1,join x l2 r2)
    -  where
    -    (l1,l2) = partition p l
    -    (r1,r2) = partition p r
    +partition p (view -> Bin _ x l r)
    +  | p x       = (join x l1 r1,merge l2 r2)
    +  | otherwise = (merge l1 r1,join x l2 r2)
    +  where
    +    (l1,l2) = partition p l
    +    (r1,r2) = partition p r
    +partition _ _ = (tip,tip)
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 427
    -mapMonotonic _ (view -> Tip) = tip
    -mapMonotonic f (view -> Bin sz x l r) = bin sz (f x) (mapMonotonic f l) (mapMonotonic f r)
    +mapMonotonic f (view -> Bin sz x l r) = bin sz (f x) (mapMonotonic f l) (mapMonotonic f r)
    +mapMonotonic _ _ = tip
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 440
    -foldr _ z (view -> Tip)         = z
    -foldr f z (view -> Bin _ x l r) = foldr f (f x (foldr f z r)) l
    +foldr f z (view -> Bin _ x l r) = foldr f (f x (foldr f z r)) l
    +foldr _ z _ = z
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 537
    -{-
    -XXX unused code
    -
    -showSet :: (Show a) => [a] -> ShowS
    -showSet []     
    -  = showString "{}" 
    -showSet (x:xs) 
    -  = showChar '{' . shows x . showTail xs
    -  where
    -    showTail []       = showChar '}'
    -    showTail (x':xs') = showChar ',' . shows x' . showTail xs'
    --}
    -
    -{--------------------------------------------------------------------
    -  Read
    ---------------------------------------------------------------------}
    -instance (US a, Read a, Ord a) => Read (USet a) where
    -#ifdef __GLASGOW_HASKELL__
    -  readPrec = parens $ prec 10 $ do
    -    Ident "fromList" <- lexP
    -    xs <- readPrec
    -    return (fromList xs)
    -
    -  readListPrec = readListPrecDefault
    -#else
    -  readsPrec p = readParen (p > 10) $ \ r -> do
    -    ("fromList",s) <- lex r
    -    (xs,t) <- reads s
    -    return (fromList xs,t)
    -#endif
    +{--------------------------------------------------------------------
    +  Read
    +--------------------------------------------------------------------}
    +instance (US a, Read a, Ord a) => Read (USet a) where
    +#ifdef __GLASGOW_HASKELL__
    +  readPrec = parens $ prec 10 $ do
    +    Ident "fromList" <- lexP
    +    xs <- readPrec
    +    return (fromList xs)
    +
    +  readListPrec = readListPrecDefault
    +#else
    +  readsPrec p = readParen (p > 10) $ \ r -> do
    +    ("fromList",s) <- lex r
    +    (xs,t) <- reads s
    +    return (fromList xs,t)
    +#endif
    +
    +{--------------------------------------------------------------------
    +  Typeable/Data
    +--------------------------------------------------------------------}
    +
    +-- #include "Typeable.h"
    +-- INSTANCE_TYPEABLE1(Set,setTc,"Set")
    +
    +{--------------------------------------------------------------------
    +  Utility functions that return sub-ranges of the original
    +  tree. Some functions take a comparison function as argument to
    +  allow comparisons against infinite values. A function [cmplo x]
    +  should be read as [compare lo x].
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 568
    -{--------------------------------------------------------------------
    -  Typeable/Data
    ---------------------------------------------------------------------}
    -
    --- #include "Typeable.h"
    --- INSTANCE_TYPEABLE1(Set,setTc,"Set")
    -
    -{--------------------------------------------------------------------
    -  Utility functions that return sub-ranges of the original
    -  tree. Some functions take a comparison function as argument to
    -  allow comparisons against infinite values. A function [cmplo x]
    -  should be read as [compare lo x].
    -
    -  [trim cmplo cmphi t]  A tree that is either empty or where [cmplo x == LT]
    -                        and [cmphi x == GT] for the value [x] of the root.
    -  [filterGt cmp t]      A tree where for all values [k]. [cmp k == LT]
    -  [filterLt cmp t]      A tree where for all values [k]. [cmp k == GT]
    -
    -  [split k t]           Returns two trees [l] and [r] where all values
    -                        in [l] are <[k] and all keys in [r] are >[k].
    -  [splitMember k t]     Just like [split] but also returns whether [k]
    -                        was found in the tree.
    ---------------------------------------------------------------------}
    -
    -{--------------------------------------------------------------------
    -  [trim lo hi t] trims away all subtrees that surely contain no
    -  values between the range [lo] to [hi]. The returned tree is either
    -  empty or the key of the root is between @lo@ and @hi@.
    +  [trim cmplo cmphi t]  A tree that is either empty or where [cmplo x == LT]
    +                        and [cmphi x == GT] for the value [x] of the root.
    +  [filterGt cmp t]      A tree where for all values [k]. [cmp k == LT]
    +  [filterLt cmp t]      A tree where for all values [k]. [cmp k == GT]
    +
    +  [split k t]           Returns two trees [l] and [r] where all values
    +                        in [l] are <[k] and all keys in [r] are >[k].
    +  [splitMember k t]     Just like [split] but also returns whether [k]
    +                        was found in the tree.
    +--------------------------------------------------------------------}
    +
    +{--------------------------------------------------------------------
    +  [trim lo hi t] trims away all subtrees that surely contain no
    +  values between the range [lo] to [hi]. The returned tree is either
    +  empty or the key of the root is between @lo@ and @hi@.
    +--------------------------------------------------------------------}
    +trim :: US a => (a -> Ordering) -> (a -> Ordering) -> USet a -> USet a
    +trim cmplo cmphi t@(view -> Bin _ x l r)
    +  = case cmplo x of
    +      LT -> case cmphi x of
    +              GT -> t
    +              _  -> trim cmplo cmphi l
    +      _  -> trim cmplo cmphi r
    +trim _     _     _ = tip
    +
    +{--------------------------------------------------------------------
    +  [filterGt x t] filter all values >[x] from tree [t]
    +  [filterLt x t] filter all values <[x] from tree [t]
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 597
    -trim :: US a => (a -> Ordering) -> (a -> Ordering) -> USet a -> USet a
    -trim _     _     (view -> Tip) = tip
    -trim cmplo cmphi t@(view -> Bin _ x l r)
    -  = case cmplo x of
    -      LT -> case cmphi x of
    -              GT -> t
    -              _  -> trim cmplo cmphi l
    -      _  -> trim cmplo cmphi r
    -
    -{--------------------------------------------------------------------
    -  [filterGt x t] filter all values >[x] from tree [t]
    -  [filterLt x t] filter all values <[x] from tree [t]
    ---------------------------------------------------------------------}
    -filterGt :: US a => (a -> Ordering) -> USet a -> USet a
    -filterGt _ (view -> Tip) = tip
    -filterGt cmp (view -> Bin _ x l r)
    -  = case cmp x of
    -      LT -> join x (filterGt cmp l) r
    -      GT -> filterGt cmp r
    -      EQ -> r
    -      
    -filterLt :: US a => (a -> Ordering) -> USet a -> USet a
    -filterLt _ (view -> Tip) = tip
    -filterLt cmp (view -> Bin _ x l r)
    -  = case cmp x of
    -      LT -> filterLt cmp l
    -      GT -> join x l (filterLt cmp r)
    -      EQ -> l
    -
    -
    -{--------------------------------------------------------------------
    -  Split
    ---------------------------------------------------------------------}
    --- | /O(log n)/. The expression (@'split' x set@) is a pair @(set1,set2)@
    --- where @set1@ comprises the elements of @set@ less than @x@ and @set2@
    --- comprises the elements of @set@ greater than @x@.
    -split :: (US a, Ord a) => a -> USet a -> (USet a,USet a)
    -split _ (view -> Tip) = (tip,tip)
    -split x (view -> Bin _ y l r)
    -  = case compare x y of
    -      LT -> let (lt,gt) = split x l in (lt,join y gt r)
    -      GT -> let (lt,gt) = split x r in (join y l lt,gt)
    -      EQ -> (l,r)
    -
    --- | /O(log n)/. Performs a 'split' but also returns whether the pivot
    --- element was found in the original set.
    -splitMember :: (US a, Ord a) => a -> USet a -> (USet a,Bool,USet a)
    -splitMember x t = let (l,m,r) = splitLookup x t in
    -     (l,maybe False (const True) m,r)
    -
    --- | /O(log n)/. Performs a 'split' but also returns the pivot
    --- element that was found in the original set.
    -splitLookup :: (US a, Ord a) => a -> USet a -> (USet a,Maybe a,USet a)
    -splitLookup _ (view -> Tip) = (tip,Nothing,tip)
    -splitLookup x (view -> Bin _ y l r)
    -   = case compare x y of
    -       LT -> let (lt,found,gt) = splitLookup x l in (lt,found,join y gt r)
    -       GT -> let (lt,found,gt) = splitLookup x r in (join y l lt,found,gt)
    -       EQ -> (l,Just y,r)
    -
    -{--------------------------------------------------------------------
    -  Utility functions that maintain the balance properties of the tree.
    -  All constructors assume that all values in [l] < [x] and all values
    -  in [r] > [x], and that [l] and [r] are valid trees.
    -  
    -  In order of sophistication:
    -    [Bin sz x l r]    The type constructor.
    -    [bin_ x l r]      Maintains the correct size, assumes that both [l]
    -                      and [r] are balanced with respect to each other.
    -    [balance x l r]   Restores the balance and size.
    -                      Assumes that the original tree was balanced and
    -                      that [l] or [r] has changed by at most one element.
    -    [join x l r]      Restores balance and size. 
    -
    -  Furthermore, we can construct a new tree from two trees. Both operations
    -  assume that all values in [l] < all values in [r] and that [l] and [r]
    -  are valid:
    -    [glue l r]        Glues [l] and [r] together. Assumes that [l] and
    -                      [r] are already balanced with respect to each other.
    -    [merge l r]       Merges two trees and restores balance.
    -
    -  Note: in contrast to Adam's paper, we use (<=) comparisons instead
    -  of (<) comparisons in [join], [merge] and [balance]. 
    -  Quickcheck (on [difference]) showed that this was necessary in order 
    -  to maintain the invariants. It is quite unsatisfactory that I haven't 
    -  been able to find out why this is actually the case! Fortunately, it 
    -  doesn't hurt to be a bit more conservative.
    ---------------------------------------------------------------------}
    -
    -{--------------------------------------------------------------------
    -  Join 
    ---------------------------------------------------------------------}
    -join :: US a => a -> USet a -> USet a -> USet a
    -join x (view -> Tip) r  = insertMin x r
    -join x l (view -> Tip)  = insertMax x l
    -join x l@(view -> Bin sizeL y ly ry) r@(view -> Bin sizeR z lz rz)
    -  | delta*sizeL <= sizeR  = balance z (join x l lz) rz
    -  | delta*sizeR <= sizeL  = balance y ly (join x ry r)
    -  | otherwise             = bin_ x l r
    -
    -
    --- insertMin and insertMax don't perform potentially expensive comparisons.
    -insertMax,insertMin :: US a => a -> USet a -> USet a 
    -insertMax x t
    -  = case view t of
    -      Tip -> singleton x
    -      Bin _ y l r
    -          -> balance y l (insertMax x r)
    -             
    -insertMin x t
    -  = case view t of
    -      Tip -> singleton x
    -      Bin _ y l r
    -          -> balance y (insertMin x l) r
    -             
    -{--------------------------------------------------------------------
    -  [merge l r]: merges two trees.
    ---------------------------------------------------------------------}
    -merge :: US a => USet a -> USet a -> USet a
    -merge (view -> Tip) r   = r
    -merge l (view -> Tip)   = l
    -merge l@(view -> Bin sizeL x lx rx) r@(view -> Bin sizeR y ly ry)
    -  | delta*sizeL <= sizeR = balance y (merge l ly) ry
    -  | delta*sizeR <= sizeL = balance x lx (merge rx r)
    -  | otherwise            = glue l r
    -
    -{--------------------------------------------------------------------
    -  [glue l r]: glues two trees together.
    -  Assumes that [l] and [r] are already balanced with respect to each other.
    ---------------------------------------------------------------------}
    -glue :: US a => USet a -> USet a -> USet a
    -glue (view -> Tip) r = r
    -glue l (view -> Tip) = l
    -glue l r   
    -  | size l > size r = let (m,l') = deleteFindMax l in balance m l' r
    -  | otherwise       = let (m,r') = deleteFindMin r in balance m l r'
    -
    -
    --- | /O(log n)/. Delete and find the minimal element.
    --- 
    --- > deleteFindMin set = (findMin set, deleteMin set)
    -
    -deleteFindMin :: US a => USet a -> (a,USet a)
    -deleteFindMin t 
    -  = case view t of
    -      Bin _ x (view -> Tip) r -> (x,r)
    -      Bin _ x l r   -> let (xm,l') = deleteFindMin l in (xm,balance x l' r)
    -      Tip           -> (error "Set.deleteFindMin: can not return the minimal element of an empty set", tip)
    -
    --- | /O(log n)/. Delete and find the maximal element.
    --- 
    --- > deleteFindMax set = (findMax set, deleteMax set)
    -deleteFindMax :: US a => USet a -> (a,USet a)
    -deleteFindMax t
    -  = case view t of
    -      Bin _ x l (view -> Tip) -> (x,l)
    -      Bin _ x l r   -> let (xm,r') = deleteFindMax r in (xm,balance x l r')
    -      Tip           -> (error "Set.deleteFindMax: can not return the maximal element of an empty set", tip)
    -
    --- | /O(log n)/. Retrieves the minimal key of the set, and the set
    --- stripped of that element, or 'Nothing' if passed an empty set.
    -minView :: US a => USet a -> Maybe (a, USet a)
    -minView (view -> Tip) = Nothing
    -minView x = Just (deleteFindMin x)
    -
    --- | /O(log n)/. Retrieves the maximal key of the set, and the set
    --- stripped of that element, or 'Nothing' if passed an empty set.
    -maxView :: US a => USet a -> Maybe (a, USet a)
    -maxView (view -> Tip) = Nothing
    -maxView x = Just (deleteFindMax x)
    -
    -{--------------------------------------------------------------------
    -  [balance x l r] balances two trees with value x.
    -  The sizes of the trees should balance after decreasing the
    -  size of one of them. (a rotation).
    -
    -  [delta] is the maximal relative difference between the sizes of
    -          two trees, it corresponds with the [w] in Adams' paper,
    -          or equivalently, [1/delta] corresponds with the $\alpha$
    -          in Nievergelt's paper. Adams shows that [delta] should
    -          be larger than 3.745 in order to garantee that the
    -          rotations can always restore balance.         
    -
    -  [ratio] is the ratio between an outer and inner sibling of the
    -          heavier subtree in an unbalanced setting. It determines
    -          whether a double or single rotation should be performed
    -          to restore balance. It is correspondes with the inverse
    -          of $\alpha$ in Adam's article.
    -
    -  Note that:
    -  - [delta] should be larger than 4.646 with a [ratio] of 2.
    -  - [delta] should be larger than 3.745 with a [ratio] of 1.534.
    -  
    -  - A lower [delta] leads to a more 'perfectly' balanced tree.
    -  - A higher [delta] performs less rebalancing.
    -
    -  - Balancing is automatic for random data and a balancing
    -    scheme is only necessary to avoid pathological worst cases.
    -    Almost any choice will do in practice
    -    
    -  - Allthough it seems that a rather large [delta] may perform better 
    -    than smaller one, measurements have shown that the smallest [delta]
    -    of 4 is actually the fastest on a wide range of operations. It
    -    especially improves performance on worst-case scenarios like
    -    a sequence of ordered insertions.
    -
    -  Note: in contrast to Adams' paper, we use a ratio of (at least) 2
    -  to decide whether a single or double rotation is needed. Allthough
    -  he actually proves that this ratio is needed to maintain the
    -  invariants, his implementation uses a (invalid) ratio of 1. 
    -  He is aware of the problem though since he has put a comment in his 
    -  original source code that he doesn't care about generating a 
    -  slightly inbalanced tree since it doesn't seem to matter in practice. 
    -  However (since we use quickcheck :-) we will stick to strictly balanced 
    -  trees.
    ---------------------------------------------------------------------}
    -delta,ratio :: Int
    -delta = 4
    -ratio = 2
    -
    -balance :: US a => a -> USet a -> USet a -> USet a
    -balance x l r
    -  | sizeL + sizeR <= 1    = bin sizeX x l r
    -  | sizeR >= delta*sizeL  = rotateL x l r
    -  | sizeL >= delta*sizeR  = rotateR x l r
    -  | otherwise             = bin sizeX x l r
    -  where
    -    sizeL = size l
    -    sizeR = size r
    -    sizeX = sizeL + sizeR + 1
    -
    --- rotate
    -rotateL :: US a => a -> USet a -> USet a -> USet a
    -rotateL x l r@(view -> Bin _ _ ly ry)
    -  | size ly < ratio*size ry = singleL x l r
    -  | otherwise               = doubleL x l r
    -rotateL _ _ (view -> Tip) = error "rotateL Tip"
    -
    -rotateR :: US a => a -> USet a -> USet a -> USet a
    -rotateR x l@(view -> Bin _ _ ly ry) r
    -  | size ry < ratio*size ly = singleR x l r
    -  | otherwise               = doubleR x l r
    -rotateR _ (view -> Tip) _ = error "rotateL Tip"
    -
    --- basic rotations
    -singleL, singleR :: US a => a -> USet a -> USet a -> USet a
    -singleL x1 t1 (view -> Bin _ x2 t2 t3)  = bin_ x2 (bin_ x1 t1 t2) t3
    -singleL _  _  (view -> Tip)             = error "singleL"
    -singleR x1 (view -> Bin _ x2 t1 t2) t3  = bin_ x2 t1 (bin_ x1 t2 t3)
    -singleR _ (view -> Tip)             _   = error "singleR"
    +filterGt :: US a => (a -> Ordering) -> USet a -> USet a
    +filterGt cmp (view -> Bin _ x l r)
    +  = case cmp x of
    +      LT -> join x (filterGt cmp l) r
    +      GT -> filterGt cmp r
    +      EQ -> r
    +filterGt _ _ = tip
    +      
    +filterLt :: US a => (a -> Ordering) -> USet a -> USet a
    +filterLt cmp (view -> Bin _ x l r)
    +  = case cmp x of
    +      LT -> filterLt cmp l
    +      GT -> join x l (filterLt cmp r)
    +      EQ -> l
    +filterLt _ _ = tip
    +
    +
    +{--------------------------------------------------------------------
    +  Split
    +--------------------------------------------------------------------}
    +-- | /O(log n)/. The expression (@'split' x set@) is a pair @(set1,set2)@
    +-- where @set1@ comprises the elements of @set@ less than @x@ and @set2@
    +-- comprises the elements of @set@ greater than @x@.
    +split :: (US a, Ord a) => a -> USet a -> (USet a,USet a)
    +split x (view -> Bin _ y l r)
    +  = case compare x y of
    +      LT -> let (lt,gt) = split x l in (lt,join y gt r)
    +      GT -> let (lt,gt) = split x r in (join y l lt,gt)
    +      EQ -> (l,r)
    +split _ _ = (tip,tip)
    +
    +-- | /O(log n)/. Performs a 'split' but also returns whether the pivot
    +-- element was found in the original set.
    +splitMember :: (US a, Ord a) => a -> USet a -> (USet a,Bool,USet a)
    +splitMember x t = let (l,m,r) = splitLookup x t in
    +     (l,maybe False (const True) m,r)
    +
    +-- | /O(log n)/. Performs a 'split' but also returns the pivot
    +-- element that was found in the original set.
    +splitLookup :: (US a, Ord a) => a -> USet a -> (USet a,Maybe a,USet a)
    +splitLookup x (view -> Bin _ y l r)
    +   = case compare x y of
    +       LT -> let (lt,found,gt) = splitLookup x l in (lt,found,join y gt r)
    +       GT -> let (lt,found,gt) = splitLookup x r in (join y l lt,found,gt)
    +       EQ -> (l,Just y,r)
    +splitLookup _ _ = (tip,Nothing,tip)
    +
    +{--------------------------------------------------------------------
    +  Utility functions that maintain the balance properties of the tree.
    +  All constructors assume that all values in [l] < [x] and all values
    +  in [r] > [x], and that [l] and [r] are valid trees.
    +  
    +  In order of sophistication:
    +    [Bin sz x l r]    The type constructor.
    +    [bin_ x l r]      Maintains the correct size, assumes that both [l]
    +                      and [r] are balanced with respect to each other.
    +    [balance x l r]   Restores the balance and size.
    +                      Assumes that the original tree was balanced and
    +                      that [l] or [r] has changed by at most one element.
    +    [join x l r]      Restores balance and size. 
    +
    +  Furthermore, we can construct a new tree from two trees. Both operations
    +  assume that all values in [l] < all values in [r] and that [l] and [r]
    +  are valid:
    +    [glue l r]        Glues [l] and [r] together. Assumes that [l] and
    +                      [r] are already balanced with respect to each other.
    +    [merge l r]       Merges two trees and restores balance.
    +
    +  Note: in contrast to Adam's paper, we use (<=) comparisons instead
    +  of (<) comparisons in [join], [merge] and [balance]. 
    +  Quickcheck (on [difference]) showed that this was necessary in order 
    +  to maintain the invariants. It is quite unsatisfactory that I haven't 
    +  been able to find out why this is actually the case! Fortunately, it 
    +  doesn't hurt to be a bit more conservative.
    +--------------------------------------------------------------------}
    +
    +{--------------------------------------------------------------------
    +  Join 
    +--------------------------------------------------------------------}
    +join :: US a => a -> USet a -> USet a -> USet a
    +join x (isTip -> True) r  = insertMin x r
    +join x l (isTip -> True)  = insertMax x l
    +join x l@(view -> Bin sizeL y ly ry) r@(view -> Bin sizeR z lz rz)
    +  | delta*sizeL <= sizeR  = balance z (join x l lz) rz
    +  | delta*sizeR <= sizeL  = balance y ly (join x ry r)
    +  | otherwise             = bin_ x l r
    +
    +
    +-- insertMin and insertMax don't perform potentially expensive comparisons.
    +insertMax,insertMin :: US a => a -> USet a -> USet a 
    +insertMax x t
    +  = case view t of
    +      Bin _ y l r -> balance y l (insertMax x r)
    +      _ -> singleton x
    +             
    +insertMin x t
    +  = case view t of
    +      Bin _ y l r -> balance y (insertMin x l) r
    +      _ -> singleton x
    +             
    +{--------------------------------------------------------------------
    +  [merge l r]: merges two trees.
    +--------------------------------------------------------------------}
    +merge :: US a => USet a -> USet a -> USet a
    +merge (isTip -> True) r   = r
    +merge l (isTip -> True)   = l
    +merge l@(view -> Bin sizeL x lx rx) r@(view -> Bin sizeR y ly ry)
    +  | delta*sizeL <= sizeR = balance y (merge l ly) ry
    +  | delta*sizeR <= sizeL = balance x lx (merge rx r)
    +  | otherwise            = glue l r
    +
    +{--------------------------------------------------------------------
    +  [glue l r]: glues two trees together.
    +  Assumes that [l] and [r] are already balanced with respect to each other.
    +--------------------------------------------------------------------}
    +glue :: US a => USet a -> USet a -> USet a
    +glue (isTip -> True) r = r
    +glue l (isTip -> True) = l
    +glue l r   
    +  | size l > size r = let (m,l') = deleteFindMax l in balance m l' r
    +  | otherwise       = let (m,r') = deleteFindMin r in balance m l r'
    +
    +
    +-- | /O(log n)/. Delete and find the minimal element.
    +-- 
    +-- > deleteFindMin set = (findMin set, deleteMin set)
    +
    +deleteFindMin :: US a => USet a -> (a,USet a)
    +deleteFindMin t 
    +  = case view t of
    +      Bin _ x (isTip -> True) r -> (x,r)
    +      Bin _ x l r   -> let (xm,l') = deleteFindMin l in (xm,balance x l' r)
    +      Tip           -> (error "Set.deleteFindMin: can not return the minimal element of an empty set", tip)
    +
    +-- | /O(log n)/. Delete and find the maximal element.
    +-- 
    +-- > deleteFindMax set = (findMax set, deleteMax set)
    +deleteFindMax :: US a => USet a -> (a,USet a)
    +deleteFindMax t
    +  = case view t of
    +      Bin _ x l (isTip -> True) -> (x,l)
    +      Bin _ x l r   -> let (xm,r') = deleteFindMax r in (xm,balance x l r')
    +      _ -> (error "Set.deleteFindMax: can not return the maximal element of an empty set", tip)
    +
    +-- | /O(log n)/. Retrieves the minimal key of the set, and the set
    +-- stripped of that element, or 'Nothing' if passed an empty set.
    +minView :: US a => USet a -> Maybe (a, USet a)
    +minView (isTip -> True) = Nothing
    +minView x = Just (deleteFindMin x)
    +
    +-- | /O(log n)/. Retrieves the maximal key of the set, and the set
    +-- stripped of that element, or 'Nothing' if passed an empty set.
    +maxView :: US a => USet a -> Maybe (a, USet a)
    +maxView (isTip -> True) = Nothing
    +maxView x = Just (deleteFindMax x)
    +
    +{--------------------------------------------------------------------
    +  [balance x l r] balances two trees with value x.
    +  The sizes of the trees should balance after decreasing the
    +  size of one of them. (a rotation).
    +
    +  [delta] is the maximal relative difference between the sizes of
    +          two trees, it corresponds with the [w] in Adams' paper,
    +          or equivalently, [1/delta] corresponds with the $\alpha$
    +          in Nievergelt's paper. Adams shows that [delta] should
    +          be larger than 3.745 in order to garantee that the
    +          rotations can always restore balance.         
    +
    +  [ratio] is the ratio between an outer and inner sibling of the
    +          heavier subtree in an unbalanced setting. It determines
    +          whether a double or single rotation should be performed
    +          to restore balance. It is correspondes with the inverse
    +          of $\alpha$ in Adam's article.
    +
    +  Note that:
    +  - [delta] should be larger than 4.646 with a [ratio] of 2.
    +  - [delta] should be larger than 3.745 with a [ratio] of 1.534.
    +  
    +  - A lower [delta] leads to a more 'perfectly' balanced tree.
    +  - A higher [delta] performs less rebalancing.
    +
    +  - Balancing is automatic for random data and a balancing
    +    scheme is only necessary to avoid pathological worst cases.
    +    Almost any choice will do in practice
    +    
    +  - Allthough it seems that a rather large [delta] may perform better 
    +    than smaller one, measurements have shown that the smallest [delta]
    +    of 4 is actually the fastest on a wide range of operations. It
    +    especially improves performance on worst-case scenarios like
    +    a sequence of ordered insertions.
    +
    +  Note: in contrast to Adams' paper, we use a ratio of (at least) 2
    +  to decide whether a single or double rotation is needed. Allthough
    +  he actually proves that this ratio is needed to maintain the
    +  invariants, his implementation uses a (invalid) ratio of 1. 
    +  He is aware of the problem though since he has put a comment in his 
    +  original source code that he doesn't care about generating a 
    +  slightly inbalanced tree since it doesn't seem to matter in practice. 
    +  However (since we use quickcheck :-) we will stick to strictly balanced 
    +  trees.
    +--------------------------------------------------------------------}
    +delta,ratio :: Int
    +delta = 4
    +ratio = 2
    +
    +balance :: US a => a -> USet a -> USet a -> USet a
    +balance x l r
    +  | sizeL + sizeR <= 1    = bin sizeX x l r
    +  | sizeR >= delta*sizeL  = rotateL x l r
    +  | sizeL >= delta*sizeR  = rotateR x l r
    +  | otherwise             = bin sizeX x l r
    +  where
    +    sizeL = size l
    +    sizeR = size r
    +    sizeX = sizeL + sizeR + 1
    +
    +-- rotate
    +rotateL :: US a => a -> USet a -> USet a -> USet a
    +rotateL x l r@(view -> Bin _ _ ly ry)
    +  | size ly < ratio*size ry = singleL x l r
    +  | otherwise               = doubleL x l r
    +rotateL _ _ _ = error "rotateL Tip"
    +
    +rotateR :: US a => a -> USet a -> USet a -> USet a
    +rotateR x l@(view -> Bin _ _ ly ry) r
    +  | size ry < ratio*size ly = singleR x l r
    +  | otherwise               = doubleR x l r
    +rotateR _ _ _ = error "rotateL Tip"
    +
    +-- basic rotations
    +singleL, singleR :: US a => a -> USet a -> USet a -> USet a
    +singleL x1 t1 (view -> Bin _ x2 t2 t3)  = bin_ x2 (bin_ x1 t1 t2) t3
    +singleL _ _ _ = error "singleL"
    +singleR x1 (view -> Bin _ x2 t1 t2) t3  = bin_ x2 t1 (bin_ x1 t2 t3)
    +singleR _ _ _ = error "singleR"
    +
    +doubleL, doubleR :: US a => a -> USet a -> USet a -> USet a
    +doubleL x1 t1 (view -> Bin _ x2 (view -> Bin _ x3 t2 t3) t4) = bin_ x3 (bin_ x1 t1 t2) (bin_ x2 t3 t4)
    +doubleL _ _ _ = error "doubleL"
    +doubleR x1 (view -> Bin _ x2 t1 (view -> Bin _ x3 t2 t3)) t4 = bin_ x3 (bin_ x2 t1 t2) (bin_ x1 t3 t4)
    +doubleR _ _ _ = error "doubleR"
    +
    +
    +{--------------------------------------------------------------------
    +  The bin constructor maintains the size of the tree
    +--------------------------------------------------------------------}
    +bin_ :: US a => a -> USet a -> USet a -> USet a
    +bin_ x l r
    +  = bin (size l + size r + 1) x l r
    +
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 848
    -doubleL, doubleR :: US a => a -> USet a -> USet a -> USet a
    -doubleL x1 t1 (view -> Bin _ x2 (view -> Bin _ x3 t2 t3) t4) = bin_ x3 (bin_ x1 t1 t2) (bin_ x2 t3 t4)
    -doubleL _ _ _ = error "doubleL"
    -doubleR x1 (view -> Bin _ x2 t1 (view -> Bin _ x3 t2 t3)) t4 = bin_ x3 (bin_ x2 t1 t2) (bin_ x1 t3 t4)
    -doubleR _ _ _ = error "doubleR"
    -
    -
    -{--------------------------------------------------------------------
    -  The bin constructor maintains the size of the tree
    ---------------------------------------------------------------------}
    -bin_ :: US a => a -> USet a -> USet a -> USet a
    -bin_ x l r
    -  = bin (size l + size r + 1) x l r
    -
    -
    -{--------------------------------------------------------------------
    -  Utilities
    ---------------------------------------------------------------------}
    -foldlStrict :: (a -> b -> a) -> a -> [b] -> a
    -foldlStrict f z xs
    -  = case xs of
    -      []     -> z
    -      (x:xx) -> let z' = f z x in seq z' (foldlStrict f z' xx)
    -
    +{--------------------------------------------------------------------
    +  Utilities
    +--------------------------------------------------------------------}
    +foldlStrict :: (a -> b -> a) -> a -> [b] -> a
    +foldlStrict f z xs
    +  = case xs of
    +      []     -> z
    +      (x:xx) -> let z' = f z x in seq z' (foldlStrict f z' xx)
    +
    +
    +{--------------------------------------------------------------------
    +  Debugging
    +--------------------------------------------------------------------}
    +-- | /O(n)/. Show the tree that implements the set. The tree is shown
    +-- in a compressed, hanging format.
    +showTree :: (US a, Show a) => USet a -> String
    +showTree s
    +  = showTreeWith True False s
    +
    +
    +{- | /O(n)/. The expression (@showTreeWith hang wide map@) shows
    + the tree that implements the set. If @hang@ is
    + @True@, a /hanging/ tree is shown otherwise a rotated tree is shown. If
    + @wide@ is 'True', an extra wide version is shown.
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 873
    -{--------------------------------------------------------------------
    -  Debugging
    ---------------------------------------------------------------------}
    --- | /O(n)/. Show the tree that implements the set. The tree is shown
    --- in a compressed, hanging format.
    -showTree :: (US a, Show a) => USet a -> String
    -showTree s
    -  = showTreeWith True False s
    -
    -
    -{- | /O(n)/. The expression (@showTreeWith hang wide map@) shows
    - the tree that implements the set. If @hang@ is
    - @True@, a /hanging/ tree is shown otherwise a rotated tree is shown. If
    - @wide@ is 'True', an extra wide version is shown.
    -
    -> Set> putStrLn $ showTreeWith True False $ fromDistinctAscList [1..5]
    -> 4
    -> +--2
    -> |  +--1
    -> |  +--3
    -> +--5
    -> 
    -> Set> putStrLn $ showTreeWith True True $ fromDistinctAscList [1..5]
    -> 4
    -> |
    +> Set> putStrLn $ showTreeWith True False $ fromDistinctAscList [1..5]
    +> 4
    +> +--2
    +> |  +--1
    +> |  +--3
    +> +--5
    +> 
    +> Set> putStrLn $ showTreeWith True True $ fromDistinctAscList [1..5]
    +> 4
    +> |
    +> +--2
    +> |  |
    +> |  +--1
    +> |  |
    +> |  +--3
    +> |
    +> +--5
    +> 
    +> Set> putStrLn $ showTreeWith False True $ fromDistinctAscList [1..5]
    +> +--5
    +> |
    +> 4
    +> |
    +> |  +--3
    +> |  |
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 899
    -> |  |
    -> |  +--1
    -> |  |
    -> |  +--3
    -> |
    -> +--5
    -> 
    -> Set> putStrLn $ showTreeWith False True $ fromDistinctAscList [1..5]
    -> +--5
    -> |
    -> 4
    -> |
    -> |  +--3
    -> |  |
    -> +--2
    ->    |
    ->    +--1
    -
    --}
    -showTreeWith :: (US a, Show a) => Bool -> Bool -> USet a -> String
    -showTreeWith hang wide t
    -  | hang      = (showsTreeHang wide [] t) ""
    -  | otherwise = (showsTree wide [] [] t) ""
    -
    -showsTree :: (US a, Show a) => Bool -> [String] -> [String] -> USet a -> ShowS
    -showsTree wide lbars rbars t
    -  = case view t of
    -      Tip -> showsBars lbars . showString "|\n"
    -      Bin _ x (view -> Tip) (view -> Tip)
    -          -> showsBars lbars . shows x . showString "\n" 
    -      Bin _ x l r
    -          -> showsTree wide (withBar rbars) (withEmpty rbars) r .
    -             showWide wide rbars .
    -             showsBars lbars . shows x . showString "\n" .
    -             showWide wide lbars .
    -             showsTree wide (withEmpty lbars) (withBar lbars) l
    -
    -showsTreeHang :: (US a, Show a) => Bool -> [String] -> USet a -> ShowS
    -showsTreeHang wide bars t
    -  = case view t of
    -      Tip -> showsBars bars . showString "|\n" 
    -      Bin _ x (view -> Tip) (view -> Tip) 
    -          -> showsBars bars . shows x . showString "\n" 
    -      Bin _ x l r
    -          -> showsBars bars . shows x . showString "\n" . 
    -             showWide wide bars .
    -             showsTreeHang wide (withBar bars) l .
    -             showWide wide bars .
    -             showsTreeHang wide (withEmpty bars) r
    -
    -showWide :: Bool -> [String] -> String -> String
    -showWide wide bars 
    -  | wide      = showString (concat (reverse bars)) . showString "|\n" 
    -  | otherwise = id
    -
    -showsBars :: [String] -> ShowS
    -showsBars bars
    -  = case bars of
    -      [] -> id
    -      _  -> showString (concat (reverse (tail bars))) . showString node
    +>    |
    +>    +--1
    +
    +-}
    +showTreeWith :: (US a, Show a) => Bool -> Bool -> USet a -> String
    +showTreeWith hang wide t
    +  | hang      = (showsTreeHang wide [] t) ""
    +  | otherwise = (showsTree wide [] [] t) ""
    +
    +showsTree :: (US a, Show a) => Bool -> [String] -> [String] -> USet a -> ShowS
    +showsTree wide lbars rbars t
    +  = case view t of
    +      Tip -> showsBars lbars . showString "|\n"
    +      Bin _ x (isTip -> True) (isTip -> True)
    +          -> showsBars lbars . shows x . showString "\n" 
    +      Bin _ x l r
    +          -> showsTree wide (withBar rbars) (withEmpty rbars) r .
    +             showWide wide rbars .
    +             showsBars lbars . shows x . showString "\n" .
    +             showWide wide lbars .
    +             showsTree wide (withEmpty lbars) (withBar lbars) l
    +
    +showsTreeHang :: (US a, Show a) => Bool -> [String] -> USet a -> ShowS
    +showsTreeHang wide bars t
    +  = case view t of
    +      Tip -> showsBars bars . showString "|\n" 
    +      Bin _ x (isTip -> True) (isTip -> True) 
    +          -> showsBars bars . shows x . showString "\n" 
    +      Bin _ x l r
    +          -> showsBars bars . shows x . showString "\n" . 
    +             showWide wide bars .
    +             showsTreeHang wide (withBar bars) l .
    +             showWide wide bars .
    +             showsTreeHang wide (withEmpty bars) r
    +
    +showWide :: Bool -> [String] -> String -> String
    +showWide wide bars 
    +  | wide      = showString (concat (reverse bars)) . showString "|\n" 
    +  | otherwise = id
    +
    +showsBars :: [String] -> ShowS
    +showsBars bars
    +  = case bars of
    +      [] -> id
    +      _  -> showString (concat (reverse (tail bars))) . showString node
    +
    +node :: String
    +node           = "+--"
    +
    +withBar, withEmpty :: [String] -> [String]
    +withBar bars   = "|  ":bars
    +withEmpty bars = "   ":bars
    +
    +{--------------------------------------------------------------------
    +  Assertions
    +--------------------------------------------------------------------}
    +-- | /O(n)/. Test if the internal set structure is valid.
    +valid :: (US a, Ord a) => USet a -> Bool
    +valid t
    +  = balanced t && ordered t && validsize t
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 960
    -node :: String
    -node           = "+--"
    -
    -withBar, withEmpty :: [String] -> [String]
    -withBar bars   = "|  ":bars
    -withEmpty bars = "   ":bars
    -
    -{--------------------------------------------------------------------
    -  Assertions
    ---------------------------------------------------------------------}
    --- | /O(n)/. Test if the internal set structure is valid.
    -valid :: (US a, Ord a) => USet a -> Bool
    -valid t
    -  = balanced t && ordered t && validsize t
    -
    -ordered :: (US a, Ord a) => USet a -> Bool
    -ordered t
    -  = bounded (const True) (const True) t
    -  where
    -    bounded lo hi t'
    -      = case view t' of
    -          Tip         -> True
    -          Bin _ x l r -> (lo x) && (hi x) && bounded lo (<x) l && bounded (>x) hi r
    -
    -balanced :: US a => USet a -> Bool
    -balanced t
    -  = case view t of
    -      Tip         -> True
    -      Bin _ _ l r -> (size l + size r <= 1 || (size l <= delta*size r && size r <= delta*size l)) &&
    -                     balanced l && balanced r
    -
    -validsize :: US a => USet a -> Bool
    -validsize t
    -  = (realsize t == Just (size t))
    -  where
    -    realsize t'
    -      = case view t' of
    -          Tip          -> Just 0
    -          Bin sz _ l r -> case (realsize l,realsize r) of
    -                            (Just n,Just m)  | n+m+1 == sz  -> Just sz
    -                            _                -> Nothing
    -
    -{-
    -{--------------------------------------------------------------------
    -  Testing
    ---------------------------------------------------------------------}
    -testTree :: [Int] -> USet Int
    -testTree xs   = fromList xs
    -test1 = testTree [1..20]
    -test2 = testTree [30,29..10]
    -test3 = testTree [1,4,6,89,2323,53,43,234,5,79,12,9,24,9,8,423,8,42,4,8,9,3]
    -
    -{--------------------------------------------------------------------
    -  QuickCheck
    ---------------------------------------------------------------------}
    -
    -{-
    -qcheck prop
    -  = check config prop
    -  where
    -    config = Config
    -      { configMaxTest = 500
    -      , configMaxFail = 5000
    -      , configSize    = \n -> (div n 2 + 3)
    -      , configEvery   = \n args -> let s = show n in s ++ [ '\b' | _ <- s ]
    -      }
    --}
    -
    -
    -{--------------------------------------------------------------------
    -  Arbitrary, reasonably balanced trees
    ---------------------------------------------------------------------}
    -instance (US a, Enum a) => Arbitrary (USet a) where
    -  arbitrary = sized (arbtree 0 maxkey)
    -            where maxkey  = 10000
    +ordered :: (US a, Ord a) => USet a -> Bool
    +ordered t
    +  = bounded (const True) (const True) t
    +  where
    +    bounded lo hi t'
    +      = case view t' of
    +          Bin _ x l r -> (lo x) && (hi x) && bounded lo (<x) l && bounded (>x) hi r
    +          _ -> True
    +
    +balanced :: US a => USet a -> Bool
    +balanced t
    +  = case view t of
    +      Bin _ _ l r -> (size l + size r <= 1 || (size l <= delta*size r && size r <= delta*size l)) &&
    +                     balanced l && balanced r
    +      _ -> True
    +
    +validsize :: US a => USet a -> Bool
    +validsize t
    +  = (realsize t == Just (size t))
    +  where
    +    realsize t'
    +      = case view t' of
    +          Bin sz _ l r -> case (realsize l,realsize r) of
    +                            (Just n,Just m)  | n+m+1 == sz  -> Just sz
    +                            _                -> Nothing
    +          _ -> Just 0
    +
    +{-
    +{--------------------------------------------------------------------
    +  Testing
    +--------------------------------------------------------------------}
    +testTree :: [Int] -> USet Int
    +testTree xs   = fromList xs
    +test1 = testTree [1..20]
    +test2 = testTree [30,29..10]
    +test3 = testTree [1,4,6,89,2323,53,43,234,5,79,12,9,24,9,8,423,8,42,4,8,9,3]
    +
    +{--------------------------------------------------------------------
    +  QuickCheck
    +--------------------------------------------------------------------}
    +
    +{-
    +qcheck prop
    +  = check config prop
    +  where
    +    config = Config
    +      { configMaxTest = 500
    +      , configMaxFail = 5000
    +      , configSize    = \n -> (div n 2 + 3)
    +      , configEvery   = \n args -> let s = show n in s ++ [ '\b' | _ <- s ]
    +      }
    +-}
    +
    +
    +{--------------------------------------------------------------------
    +  Arbitrary, reasonably balanced trees
    +--------------------------------------------------------------------}
    +instance (US a, Enum a) => Arbitrary (USet a) where
    +  arbitrary = sized (arbtree 0 maxkey)
    +            where maxkey  = 10000
    +
    +arbtree :: (US a, Enum a) => Int -> Int -> Int -> Gen (USet a)
    +arbtree lo hi n
    +  | n <= 0        = return tip
    +  | lo >= hi      = return tip
    +  | otherwise     = do{ i  <- choose (lo,hi)
    +                      ; m  <- choose (1,30)
    +                      ; let (ml,mr)  | m==(1::Int)= (1,2)
    +                                     | m==2       = (2,1)
    +                                     | m==3       = (1,1)
    +                                     | otherwise  = (2,2)
    +                      ; l  <- arbtree lo (i-1) (n `div` ml)
    +                      ; r  <- arbtree (i+1) hi (n `div` mr)
    +                      ; return (bin_ (toEnum i) l r)
    +                      }  
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 1036
    -arbtree :: (US a, Enum a) => Int -> Int -> Int -> Gen (USet a)
    -arbtree lo hi n
    -  | n <= 0        = return tip
    -  | lo >= hi      = return tip
    -  | otherwise     = do{ i  <- choose (lo,hi)
    -                      ; m  <- choose (1,30)
    -                      ; let (ml,mr)  | m==(1::Int)= (1,2)
    -                                     | m==2       = (2,1)
    -                                     | m==3       = (1,1)
    -                                     | otherwise  = (2,2)
    -                      ; l  <- arbtree lo (i-1) (n `div` ml)
    -                      ; r  <- arbtree (i+1) hi (n `div` mr)
    -                      ; return (bin_ (toEnum i) l r)
    -                      }  
    -
    -
    -{--------------------------------------------------------------------
    -  Valid tree's
    ---------------------------------------------------------------------}
    -forValid :: (US a, Enum a,Show a,Testable b) => (USet a -> b) -> Property
    -forValid f
    -  = forAll arbitrary $ \t -> 
    ---    classify (balanced t) "balanced" $
    -    classify (size t == 0) "empty" $
    -    classify (size t > 0  && size t <= 10) "small" $
    -    classify (size t > 10 && size t <= 64) "medium" $
    -    classify (size t > 64) "large" $
    -    balanced t ==> f t
    -
    -forValidIntTree :: Testable a => (USet Int -> a) -> Property
    -forValidIntTree f
    -  = forValid f
    +
    +{--------------------------------------------------------------------
    +  Valid tree's
    +--------------------------------------------------------------------}
    +forValid :: (US a, Enum a,Show a,Testable b) => (USet a -> b) -> Property
    +forValid f
    +  = forAll arbitrary $ \t -> 
    +--    classify (balanced t) "balanced" $
    +    classify (size t == 0) "empty" $
    +    classify (size t > 0  && size t <= 10) "small" $
    +    classify (size t > 10 && size t <= 64) "medium" $
    +    classify (size t > 64) "large" $
    +    balanced t ==> f t
    +
    +forValidIntTree :: Testable a => (USet Int -> a) -> Property
    +forValidIntTree f
    +  = forValid f
    +
    +forValidUnitTree :: Testable a => (USet Int -> a) -> Property
    +forValidUnitTree f
    +  = forValid f
    +
    +
    +prop_Valid 
    +  = forValidUnitTree $ \t -> valid t
    +
    +{--------------------------------------------------------------------
    +  Single, Insert, Delete
    +--------------------------------------------------------------------}
    +prop_Single :: Int -> Bool
    +prop_Single x
    +  = (insert x empty == singleton x)
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 1069
    -forValidUnitTree :: Testable a => (USet Int -> a) -> Property
    -forValidUnitTree f
    -  = forValid f
    +prop_InsertValid :: Int -> Property
    +prop_InsertValid k
    +  = forValidUnitTree $ \t -> valid (insert k t)
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 1073
    -
    -prop_Valid 
    -  = forValidUnitTree $ \t -> valid t
    +prop_InsertDelete :: Int -> USet Int -> Property
    +prop_InsertDelete k t
    +  = not (member k t) ==> delete k (insert k t) == t
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 1077
    -{--------------------------------------------------------------------
    -  Single, Insert, Delete
    ---------------------------------------------------------------------}
    -prop_Single :: Int -> Bool
    -prop_Single x
    -  = (insert x empty == singleton x)
    -
    -prop_InsertValid :: Int -> Property
    -prop_InsertValid k
    -  = forValidUnitTree $ \t -> valid (insert k t)
    -
    -prop_InsertDelete :: Int -> USet Int -> Property
    -prop_InsertDelete k t
    -  = not (member k t) ==> delete k (insert k t) == t
    -
    -prop_DeleteValid :: Int -> Property
    -prop_DeleteValid k
    -  = forValidUnitTree $ \t -> 
    -    valid (delete k (insert k t))
    +prop_DeleteValid :: Int -> Property
    +prop_DeleteValid k
    +  = forValidUnitTree $ \t -> 
    +    valid (delete k (insert k t))
    +
    +{--------------------------------------------------------------------
    +  Balance
    +--------------------------------------------------------------------}
    +prop_Join :: Int -> Property 
    +prop_Join x
    +  = forValidUnitTree $ \t ->
    +    let (l,r) = split x t
    +    in valid (join x l r)
    +
    +prop_Merge :: Int -> Property 
    +prop_Merge x
    +  = forValidUnitTree $ \t ->
    +    let (l,r) = split x t
    +    in valid (merge l r)
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 1097
    -{--------------------------------------------------------------------
    -  Balance
    ---------------------------------------------------------------------}
    -prop_Join :: Int -> Property 
    -prop_Join x
    -  = forValidUnitTree $ \t ->
    -    let (l,r) = split x t
    -    in valid (join x l r)
    -
    -prop_Merge :: Int -> Property 
    -prop_Merge x
    -  = forValidUnitTree $ \t ->
    -    let (l,r) = split x t
    -    in valid (merge l r)
    -
    -
    -{--------------------------------------------------------------------
    -  Union
    ---------------------------------------------------------------------}
    -prop_UnionValid :: Property
    -prop_UnionValid
    -  = forValidUnitTree $ \t1 ->
    -    forValidUnitTree $ \t2 ->
    -    valid (union t1 t2)
    -
    -prop_UnionInsert :: Int -> USet Int -> Bool
    -prop_UnionInsert x t
    -  = union t (singleton x) == insert x t
    -
    -prop_UnionAssoc :: USet Int -> USet Int -> USet Int -> Bool
    -prop_UnionAssoc t1 t2 t3
    -  = union t1 (union t2 t3) == union (union t1 t2) t3
    +
    +{--------------------------------------------------------------------
    +  Union
    +--------------------------------------------------------------------}
    +prop_UnionValid :: Property
    +prop_UnionValid
    +  = forValidUnitTree $ \t1 ->
    +    forValidUnitTree $ \t2 ->
    +    valid (union t1 t2)
    +
    +prop_UnionInsert :: Int -> USet Int -> Bool
    +prop_UnionInsert x t
    +  = union t (singleton x) == insert x t
    +
    +prop_UnionAssoc :: USet Int -> USet Int -> USet Int -> Bool
    +prop_UnionAssoc t1 t2 t3
    +  = union t1 (union t2 t3) == union (union t1 t2) t3
    +
    +prop_UnionComm :: USet Int -> USet Int -> Bool
    +prop_UnionComm t1 t2
    +  = (union t1 t2 == union t2 t1)
    +
    +
    +prop_DiffValid
    +  = forValidUnitTree $ \t1 ->
    +    forValidUnitTree $ \t2 ->
    +    valid (difference t1 t2)
    +
    +prop_Diff :: [Int] -> [Int] -> Bool
    +prop_Diff xs ys
    +  =  toAscList (difference (fromList xs) (fromList ys))
    +    == List.sort ((List.\\) (nub xs)  (nub ys))
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 1130
    -prop_UnionComm :: USet Int -> USet Int -> Bool
    -prop_UnionComm t1 t2
    -  = (union t1 t2 == union t2 t1)
    -
    +prop_IntValid
    +  = forValidUnitTree $ \t1 ->
    +    forValidUnitTree $ \t2 ->
    +    valid (intersection t1 t2)
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 1135
    -prop_DiffValid
    -  = forValidUnitTree $ \t1 ->
    -    forValidUnitTree $ \t2 ->
    -    valid (difference t1 t2)
    +prop_Int :: [Int] -> [Int] -> Bool
    +prop_Int xs ys
    +  =  toAscList (intersection (fromList xs) (fromList ys))
    +    == List.sort (nub ((List.intersect) (xs)  (ys)))
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 1140
    -prop_Diff :: [Int] -> [Int] -> Bool
    -prop_Diff xs ys
    -  =  toAscList (difference (fromList xs) (fromList ys))
    -    == List.sort ((List.\\) (nub xs)  (nub ys))
    -
    -prop_IntValid
    -  = forValidUnitTree $ \t1 ->
    -    forValidUnitTree $ \t2 ->
    -    valid (intersection t1 t2)
    -
    -prop_Int :: [Int] -> [Int] -> Bool
    -prop_Int xs ys
    -  =  toAscList (intersection (fromList xs) (fromList ys))
    -    == List.sort (nub ((List.intersect) (xs)  (ys)))
    -
    -{--------------------------------------------------------------------
    -  Lists
    ---------------------------------------------------------------------}
    -prop_Ordered
    -  = forAll (choose (5,100)) $ \n ->
    -    let xs = [0..n::Int]
    -    in fromAscList xs == fromList xs
    -
    -prop_List :: [Int] -> Bool
    -prop_List xs
    -  = (sort (nub xs) == toList (fromList xs))
    --}
    -
    -
    -newtype Boxed a = Boxed a
    -instance US (Boxed a) where
    -    data USet (Boxed a) = BoxedTip | BoxedBin {-# UNPACK #-} !Size (Boxed a) !(USet (Boxed a)) !(USet (Boxed a))
    -    view BoxedTip = Tip
    -    view (BoxedBin s i l r) = Bin s i l r
    -    tip = BoxedTip
    -    bin = BoxedBin
    -
    -instance US Char where
    -    data USet Char = CharTip | CharBin {-# UNPACK #-} !Size {-# UNPACK #-} !Char !(USet Char) !(USet Char)
    -    view CharTip = Tip
    -    view (CharBin s i l r) = Bin s i l r
    -    tip = CharTip
    -    bin = CharBin
    -instance US Int where
    -    data USet Int = IntTip | IntBin {-# UNPACK #-} !Size {-# UNPACK #-} !Int !(USet Int) !(USet Int)
    -    view IntTip = Tip
    -    view (IntBin s i l r) = Bin s i l r
    -    tip = IntTip
    -    bin = IntBin
    -
    -instance US Integer where
    -    data USet Integer = IntegerTip | IntegerBin {-# UNPACK #-} !Size {-# UNPACK #-} !Integer !(USet Integer) !(USet Integer)
    -    view IntegerTip = Tip
    -    view (IntegerBin s i l r) = Bin s i l r
    -    tip = IntegerTip
    -    bin = IntegerBin
    -
    -instance US Int8 where
    -    data USet Int8 = Int8Tip | Int8Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Int8 !(USet Int8) !(USet Int8)
    -    view Int8Tip = Tip
    -    view (Int8Bin s i l r) = Bin s i l r
    -    tip = Int8Tip
    -    bin = Int8Bin
    -
    -instance US Int16 where
    -    data USet Int16 = Int16Tip | Int16Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Int16 !(USet Int16) !(USet Int16)
    -    view Int16Tip = Tip
    -    view (Int16Bin s i l r) = Bin s i l r
    -    tip = Int16Tip
    -    bin = Int16Bin
    -
    -instance US Int32 where
    -    data USet Int32 = Int32Tip | Int32Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Int32 !(USet Int32) !(USet Int32)
    -    view Int32Tip = Tip
    -    view (Int32Bin s i l r) = Bin s i l r
    -    tip = Int32Tip
    -    bin = Int32Bin
    +{--------------------------------------------------------------------
    +  Lists
    +--------------------------------------------------------------------}
    +prop_Ordered
    +  = forAll (choose (5,100)) $ \n ->
    +    let xs = [0..n::Int]
    +    in fromAscList xs == fromList xs
    +
    +prop_List :: [Int] -> Bool
    +prop_List xs
    +  = (sort (nub xs) == toList (fromList xs))
    +-}
    +
    +
    +newtype Boxed a = Boxed a
    +instance US (Boxed a) where
    +    data USet (Boxed a) = BoxedTip | BoxedBin {-# UNPACK #-} !Size (Boxed a) !(USet (Boxed a)) !(USet (Boxed a))
    +    view BoxedTip = Tip
    +    view (BoxedBin s i l r) = Bin s i l r
    +    tip = BoxedTip
    +    bin = BoxedBin
    +    isTip BoxedTip = True
    +    isTip _ = False
    +
    +instance US Char where
    +    data USet Char = CharTip | CharBin {-# UNPACK #-} !Size {-# UNPACK #-} !Char !(USet Char) !(USet Char)
    +    view CharTip = Tip
    +    view (CharBin s i l r) = Bin s i l r
    +    tip = CharTip
    +    bin = CharBin
    +    isTip CharTip = True
    +    isTip _ = False
    +
    +instance US Int where
    +    data USet Int = IntTip | IntBin {-# UNPACK #-} !Size {-# UNPACK #-} !Int !(USet Int) !(USet Int)
    +    view IntTip = Tip
    +    view (IntBin s i l r) = Bin s i l r
    +    tip = IntTip
    +    bin = IntBin
    +    isTip IntTip = True
    +    isTip _ = False
    +
    +instance US Integer where
    +    data USet Integer = IntegerTip | IntegerBin {-# UNPACK #-} !Size {-# UNPACK #-} !Integer !(USet Integer) !(USet Integer)
    +    view IntegerTip = Tip
    +    view (IntegerBin s i l r) = Bin s i l r
    +    tip = IntegerTip
    +    bin = IntegerBin
    +    isTip IntegerTip = True
    +    isTip _ = False
    +
    +instance US Int8 where
    +    data USet Int8 = Int8Tip | Int8Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Int8 !(USet Int8) !(USet Int8)
    +    view Int8Tip = Tip
    +    view (Int8Bin s i l r) = Bin s i l r
    +    tip = Int8Tip
    +    bin = Int8Bin
    +    isTip Int8Tip = True
    +    isTip _ = False
    +
    +instance US Int16 where
    +    data USet Int16 = Int16Tip | Int16Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Int16 !(USet Int16) !(USet Int16)
    +    view Int16Tip = Tip
    +    view (Int16Bin s i l r) = Bin s i l r
    +    tip = Int16Tip
    +    bin = Int16Bin
    +    isTip Int16Tip = True
    +    isTip _ = False
    +
    +instance US Int32 where
    +    data USet Int32 = Int32Tip | Int32Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Int32 !(USet Int32) !(USet Int32)
    +    view Int32Tip = Tip
    +    view (Int32Bin s i l r) = Bin s i l r
    +    tip = Int32Tip
    +    bin = Int32Bin
    +    isTip Int32Tip = True
    +    isTip _ = False
    hunk ./doc/html/monoids/src/Data-Set-Unboxed.html 1224
    -
    -instance US Word8 where
    -    data USet Word8 = Word8Tip | Word8Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Word8 !(USet Word8) !(USet Word8)
    -    view Word8Tip = Tip
    -    view (Word8Bin s i l r) = Bin s i l r
    -    tip = Word8Tip
    -    bin = Word8Bin
    -
    -instance US Word16 where
    -    data USet Word16 = Word16Tip | Word16Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Word16 !(USet Word16) !(USet Word16)
    -    view Word16Tip = Tip
    -    view (Word16Bin s i l r) = Bin s i l r
    -    tip = Word16Tip
    -    bin = Word16Bin
    -
    -instance US Word32 where
    -    data USet Word32 = Word32Tip | Word32Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Word32 !(USet Word32) !(USet Word32)
    -    view Word32Tip = Tip
    -    view (Word32Bin s i l r) = Bin s i l r
    -    tip = Word32Tip
    -    bin = Word32Bin
    -
    -instance US Word64 where
    -    data USet Word64 = Word64Tip | Word64Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Word64 !(USet Word64) !(USet Word64)
    -    view Word64Tip = Tip
    -    view (Word64Bin s i l r) = Bin s i l r
    -    tip = Word64Tip
    -    bin = Word64Bin
    -
    -instance US Double where
    -    data USet Double = DoubleTip | DoubleBin {-# UNPACK #-} !Size {-# UNPACK #-} !Double !(USet Double) !(USet Double)
    -    view DoubleTip = Tip
    -    view (DoubleBin s i l r) = Bin s i l r
    -    tip = DoubleTip
    -    bin = DoubleBin
    -
    -instance US Float where
    -    data USet Float = FloatTip | FloatBin {-# UNPACK #-} !Size {-# UNPACK #-} !Float !(USet Float) !(USet Float)
    -    view FloatTip = Tip
    -    view (FloatBin s i l r) = Bin s i l r
    -    tip = FloatTip
    -    bin = FloatBin
    -
    +    isTip Int64Tip = True
    +    isTip _ = False
    +
    +instance US Word8 where
    +    data USet Word8 = Word8Tip | Word8Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Word8 !(USet Word8) !(USet Word8)
    +    view Word8Tip = Tip
    +    view (Word8Bin s i l r) = Bin s i l r
    +    tip = Word8Tip
    +    bin = Word8Bin
    +    isTip Word8Tip = True
    +    isTip _ = False
    +
    +instance US Word16 where
    +    data USet Word16 = Word16Tip | Word16Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Word16 !(USet Word16) !(USet Word16)
    +    view Word16Tip = Tip
    +    view (Word16Bin s i l r) = Bin s i l r
    +    bin = Word16Bin
    +    tip = Word16Tip
    +    isTip Word16Tip = True
    +    isTip _ = False
    +
    +instance US Word32 where
    +    data USet Word32 = Word32Tip | Word32Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Word32 !(USet Word32) !(USet Word32)
    +    view Word32Tip = Tip
    +    view (Word32Bin s i l r) = Bin s i l r
    +    tip = Word32Tip
    +    bin = Word32Bin
    +    isTip Word32Tip = True
    +    isTip _ = False
    +
    +instance US Word64 where
    +    data USet Word64 = Word64Tip | Word64Bin {-# UNPACK #-} !Size {-# UNPACK #-} !Word64 !(USet Word64) !(USet Word64)
    +    view Word64Tip = Tip
    +    view (Word64Bin s i l r) = Bin s i l r
    +    tip = Word64Tip
    +    bin = Word64Bin
    +    isTip Word64Tip = True
    +    isTip _ = False
    +
    +instance US Double where
    +    data USet Double = DoubleTip | DoubleBin {-# UNPACK #-} !Size {-# UNPACK #-} !Double !(USet Double) !(USet Double)
    +    view DoubleTip = Tip
    +    view (DoubleBin s i l r) = Bin s i l r
    +    tip = DoubleTip
    +    bin = DoubleBin
    +    isTip DoubleTip = True
    +    isTip _ = False
    +
    +instance US Float where
    +    data USet Float = FloatTip | FloatBin {-# UNPACK #-} !Size {-# UNPACK #-} !Float !(USet Float) !(USet Float)
    +    view FloatTip = Tip
    +    view (FloatBin s i l r) = Bin s i l r
    +    tip = FloatTip
    +    bin = FloatBin
    +    isTip FloatTip = True
    +    isTip _ = False
    +
    binary ./monoids-0.1.35.tar.gz
    oldhex
    *
    newhex
    *1f8b0800000000000003ecbd697bdb38b2287cbe5efd0a9ccc3c2d292d29deb29cbced3c761ca7
    *e33bce32b6337d67faf4249444d93ca64885a462bb3b737ffb5b0b5612a4e4254ef75c6ba66392
    *000a05a000140ab54cd3248dc6797f65b03a587ff8e03fbec66f057e8f1f3ea4bff02bffa5e7d5
    *d5d5478fd7d7371eafacffc7caeaeac6c6fa7f88875f059bd26f9e174106a85c174eb9717f90df
    *d41dfffdbd9ddd3787bb375b07f6c7a38d8dbaf15f7bfcf07169fcd7361ec1f8df4a27fe3f3efe
    *3be9ec228b8e4f0ad11975c5dacaca7f89ddf159908dc55fa66151b4b6e358507a2eb2300fb3cf
    *e178d06a1d84e3282fb268382fa23411413216f33c145122f2749e8d42fa328c9220bb1093349b
    *e63d7116152722cde86f3a2f5ad3741c4da25180007a22c842310bb3695414e158ccb2f4733486
    *87e22428e09f1080c4717a1625c7629426e3080be558a805483e6db504fcee0b17ab5ca41385ce
    *281d87620a430d8d280240136106c3f43326c90e2020422469118dc21ee4887211033c0463579a
    *8c4b1841a5a33888a66136a8c3046ab47a436102cd1ccf013b8d8c4441a374796424048392908d
    *1da7a3f9344c8a400dd803188b145232310d8a308b8238d7fd2ea1d0905161ab31ba8d6fc2888a
    *638624988688da5e1e0423f1bfd324cc017793466341b5e926260c31cd7240e0420c43a420684d
    *2ac2640c5f43241640689a16a1e09e021a1c03a69f35821348e6bec9d34971864424c94be4b370
    *84f4054523a4ba0c292b611acb736ec7d1abbd4371f8f6e5d14fdb07bb029edf1dbcfddbde8bdd
    *17e2f9dfc5d1ab5db1f3f6dddf0ff67e7c75245ebddd7fb17b7028b6dfbc80af6f8e0ef69ebf3f
    *7a7b70d8bab77d0825ef51c2f69bbf8bddfff3ee60f7f050bc3d107bafdfedef0130807eb0fde6
    *686ff7b027f6deececbf7fb1f7e6c79e0000e2cddba3d6fedeebbd23c876f4b64795568b89b72f
    *c5ebdd839d57f0bafd7c6f7fefe8ef54dfcbbda33758d7cbb707ad6df16efbe0686fe7fdfef681
    *78f7fee0dddbc35d81cd7ab177b8b3bfbdf77af7c5006a871ac5eedf76df1c89c357dbfbfb6e2b
    *5b6f7f7ab37b80a8db4d14cf77c5fedef6f3fd5dac881af962ef6077e7085b639e76a0e300bdfd
    *5eebf0ddeece1e3c405fec425bb60ffede93300f77fffa1e3241a278b1fd7afb47685a67418fc0
    *90ecbc3fd87d8d2843371cbe7f7e78b477f4fe6857fcf8f6ed0beae7c3dd83bfc1b675f8ff89fd
    *b787d459ef0f777bad17db47db543180809e8264787efefe708ffa6cefcdd1eec1c1fb77477b6f
    *df7461787f825e011cb7a1e80beadcb76fb0a94023bb6f0ffe8e40b10fa8ef7be2a757bbf0fd00
    *fb937a6a1bbbe0107a6ce7c8ce06f541071eb54c1bc59bdd1ff7f77edc7db3b38ba96f11ca4f7b
    *87bb5d18aabd43ccb047d5c2e0439defa9c9384480558b1e2d82edd1408abd9762fbc5dff6106d
    *991986fe704f920975d9ce2bd9dd835665fd2fedff8761319f0de293fc26f79845fcdfeaa387a5
    *fd7f7dedd1caddfe7f1bbf3ffde783799e3d80dde941364f4e82fc348ce3d63301dbf33c0ec56b
    *dc2c3b53f8b72bce60f90e5b90164d6769568817f6ae70081f634ac5cce2e953b1f75674baea7d
    *1356ee49308f0b0458a5c2bbdfb7fa95e6bf7c1d8c826110df541d0bf8ffc7eb0fd74bf37f6375
    *e5f1ddfcbf8d1f72674fffd7ff426e4a8e7deb73982183f4943e325db4626043933ce46fcf0f5f
    *acab2ffd4914874fe1a33c39b6823930609904298f12db03799ac0b500f9ef307bea4b173f84a7
    *f877eb1832c683513a7dd682e1194671545c7089f01c58b88838d9b875924ec359702cd13a298a
    *d9d3070fa0549a04632cfd200b03e0185b70ca088fd34c82781114410f56b6e2a427de00539cc1
    *292486c7a09867412cf683e4780e40c5bb2c1d85c02b26c7c08604193eb4f28b249de551ce905e
    *738ff598db0ce2e857e06091b5a526327b1e88e3105e00f034980142c4f14f32e8f6b3343b6d8d
    *c37c9445335c439fde10487d7c78ca5c72f960a74763388fe271bfb898859c53aee134f7fb8a0a
    *8478b6b93a586bb5fa7d310b46a7d033b93883735390c060004f3de67342129ec15903462b814e
    *6b4de2e0580c2f8a10b7083a96380dc521183c87e4434a16c0c1079f61c88321ec391d53aedb62
    *4813780eb3220b432fa4973ab904c99453906601f45b1cc665383b782049e3c13b993e00cc906a
    *2268ad0b5341e80208869917d33a70f07734cf3220d7c1e1d1eb122428a7d0faeb3c1a9dee9c84
    *a3d332a423e88a81492e813009800e832a6054bcbd740409a5e29857a1908593381c617e6fe903
    *9d5c8261ca597d9c87a36a43ce0bec5e48aaf6287e7cb629d6158869513b42af6976df2fc18002
    *5da2d194b2c3dc20e2441296d408e7eb2c4e613d18f799b8f2720d6f750e26cbdcc028d5a6bf73
    *9db0d4cc20893a87eb5775c2cb14a670b9a6dd84e0c8e4800ff3948998a4a7e2251cc7819b8aa3
    *6116641790c273751cce60c2e54f051d8087019c92a1d736c477df891fc4c660adc7096abdeb03
    *9e5990639e95c1c375ceb63278b4d2a36c4196c1c99b12d754da3a27592b4e291d8fffa66b9f52
    *ee9d77eff8f32c85337c9f79479946c4f323ad5770d8f77c82393245e1088a026a926719aec39f
    *c3c1fe3f1e3f5994e7607fd797e5252f1eea7b96ce67a5d71a4428e9707e1c58c8f32a3dd81ea3
    *20e673584d98cd62926d79d276787070d3a9a6f93090697b7a712da7ec87e7086d7048c2ae7769
    *1ec959eccff6fee8e593c18b106562d526a94c3fa5d9b85a13cdbdea5720d9a8bec16fb36a9103
    *dab4aad5cbef839d134f77abc49f60bfa9241e86f1a4fad13b6cef13a77b0e94dc4cbf0d9ea769
    *1c06a53c4042e9141886d2d7d744edde8f83ed79914ea157462fa2c924c46d200a8a4ae580fb34
    *1a3c8f0a387dfb52fe128740c6be943761900d8eb2c89fc80c8d2fc91912f3f9284b6744979018
    *4d042d61ce6e4cab8ebb1299645e29fe8b578ad5c18a5c8b66b3be5c139f8afe8bd71f9efffd68
    *1765256f7edc5c752ab2376b4f4526992b5a514bd2aabf9e9750c3eec1d1c1ee6ea91e7b03afd4
    *a212b18ed5c1aa6acc9abf8e77db07dbfbfbbbfba51a785bf540c704c67e55615f03f968f7ff1c
    *95a012bbe0010adf11e69a82b956071338901248877da842b6d88ea52af8ebfbbd9dbfecbcdadd
    *f94ba91e9b47f0d4639297eb9c83dd97fbbb3b28badbe4c12fef3ce5991864db192c1ac0f546a3
    *322d00eb5147098a2b51b4b65e476b400787bb3b9beb0eec2ac3d195c8eaddb3ca72f8e0ff9f0f
    *956c8ded96cb1c2e579cdd410b3925e16b302430d5af68aaaf99c2af8ff62502f0cff1c9c84afd
    *09668fe84f92b40f678da43f9ef3be10f611d5acc0f659e0081acab9ffbeb94acf284eddde7bb3
    *7b7058a220c5497117ba754ee6c9303da74e1e1570200de331407ebb062963f892f747276130bb
    *933af97e25f90fd2cf8d2b015cfefe7f6d7d75e3eefeff367ebef16796f7e6ee0016c8ff1e3d7a
    *b45196ff3fbe93ffdfceaf7f833f3c0a7fc17f98fbc5855a3cb5cf5b9064f40d20690dd6857e55
    *e700b2edb37491213c3f7cd162e8afb5fc10bfdb857ca2432870a8a48704c8111e42ea3bd89154
    *3a6cf8f406ac3cd7b54bc2ad5cb4793b6de3d5743e9fd1d5479bdad386033c9e2ee9bc7f931dd9
    *6fb5e4fd8be93cde8a3bc24ea83f7ff58439e1f6c471121ec31eacdef2f9b0c8825121dfa75132
    *cfe5b30bca8681dc8c7c9c2763fd7c9c85a388f3e81b22753f548fa227079ddf5a7f8a26e37022
    *3c1c8faf8cc5e1fc09c62a0200513289ce63f1487ca4667d24f9cc17f13a4aa2691093a4260e8b
    *10252df089a5316dd93f6d54396853b9766b1407792ec5b122109bcfb847e1915b892d06d08114
    *0188284189297f97f0f0162c10fd6722a0af04d87c33097a404a89a2e540db94107e0db394e537
    *aa91620889f0368bf145e51f0a954b57c03955065d6288fdc6d2059488dbcded1ce27bd76ab441
    *07930642be0ec471581ccad33115d2d8e1db50e6ef40d3c490b93853e94b448ec57676ddef58ed
    *a3ae7e95ece220bf525e0d40e3a2be0cadf280d3832a4e6ab80d3a2fe6889f1f174a1be80f8409
    *7e6b3501449aafed5c4c2b01d4320e2e683a185f87aa50c7a28b6e89fe0dd9d3844682973358d2
    *bb334fc53122eb591320c199055fc4d639f4e1c5167d20c840cac748c5fc8f93f1bf55465a487c
    *39192793c213e15c7ca4121fc5055231e7818f703208a1b1172a13d6cf794ca2cc7d61833f871c
    *6912aa02e7d658f9db6c466e3f3d16c7f6c0e18773ddeff886f5e3df8ec1a86b67b5266539bb6a
    *65d7a109aaf4bcabf2a946742b24563b6a9dddf3998b367ed0f8e10ba2817f3ba631120d9955e2
    *56ce6bb546a1cdf8519d843565558d71d0aeed6d6f2388c89d56d017dd0c7abbd0b3a1dcfd2ab3
    *6c483577a9f76533b8585767b4ba5f6e5ab65ce2aa6d6311e7f8f905e4c9ed265202cd5bdd1ef3
    *09d1376f95163b6565eb9a0afb3bc082d2758bd453a2bdd899a6056ed3cc9a676096163e9d506a
    *8f59e9ccb7a18b9cb318564a5b64db04c1de40bb16afd130c641ed187bb611ee40b38bf0bbb589
    *34f14557a334c33bb973c9faaee9c8fa86d462bd5668cd2d2e29a9b9bc9fdc6c40dd52a1e508ce
    *2a51b3c75a394a04677196a556197ab23e0e4b085688ce0560915333103fdddde4f9cf7bfed797
    *66372303683effaf3eda585b2debff3c5a59bb3bffdfc6efb7fe9fc4fef69b1fdf6fffb82bdec3
    *4c1c45633c04ebdbc69e38ba98856f674c11f0fa320ecf23c881f7f1e17991cb43232a4e4c31eb
    *0e3292a195b104ea6530851337beedbc7b27fed4ff57eb86cfce1e29049ceecb17d1ae2c0233a0
    *9e8c235240c944491881f99e1fbee8e7c505090a4a12095116425465100b84106529c4b6686b9c
    *db626bb4459a08902bcfa16f2ffa5e35a11eac76d1e8447dc8c5e7209eb3123ec2448d1fd1de8d
    *c32941ec91521197384dd2b35c9ca467a4883f9944a308108d61cf9ecdf05fd19697b0240e21f5
    *8211096c02342ac8cfd00682113f8c70550e1cf423b40a2800f9f8629a6633a811cd13a222274c
    *a122208a8874542039b455a008ed13a8e41e2bfca43151a97eb8d7939a51063fb42a40790da0ad
    *1b22e27052f48bb4cf161f84f798ed5bf02ba68a4ceffcb95101224314b731089f5442b001c812
    *a693c1579502393a145e41907dab0e6dbb2f741925df7181f4041281120305332e6fde8f52f38c
    *3b9307b038ca60dcd1aa25d495fc25bcc83bf84f0fb7527ce8ca94bf111d76f80fa5f2a34ac76b
    *ff271dfa9752e9a96baa2deb47f478b4c27213b48680caa03f68219566dae9fac9912e6d935e8c
    *de6e4d56bc947572924a55e788ae7be5f74fc0af459308a6a3c911e4a4fde481682ec36bca5b4a
    *7200e590aeb844c77ceda1edcf386ed7d56f72924ec51303e589e82c5d743ff8f5024bd25fa7f6
    *22dd399927a7f992400c12f8062854ca5329d43e111dfcf789617b74a7999b7da7106b011ea182
    *40e77518e473187ad885f4570f2473dd5883fe61f8691ed24206dd167e72ead3697036fc54d7fe
    *c3b0e0b245a96c81c56ac9662f2964497e720acbc40eff6d00f13a984910f0540681891dfe5b07
    *42962f17a69254acd2a14a2142e56f50ab34c7287b0ce57aceb4d9c37f6cfc7c8b1d0bb8a65501
    *575b2f0752b08b0b9a12ec9a056c641d0d6867c43511be3e7d0a0b0e0b6e151cfcd609c54759f5
    *4731ede279a3234bf49f89b08bffd2e354953d4a997358aeecd400d0b5e3dabb3c849106336d95
    *f09fa01099309a8869389d15171692f08993511f40a068d72ae8a032b1f2b9b9fc2b9b3ea3e94e
    *e725c85edd7c8350cdb529685170b0de54f97839139dff26f1799ea423d8b20762e21c13350ab4
    *1c2d40a09ca754bdd5ab5837d4350b329c1dd9d9493241bb199da50b89044d2d78d5b9c3bb4b15
    *51da427cd851c2a6d0ba72a64348d7b6be3b2a020c53d9cfa35fbc75e1f74d31aa697906cc33aa
    *7320744558fef55a0b2be4022d3e8b90ceec1a838eb58e7f4692f6a153c9b429c21adc68b59ac3
    *9ae0b6ddbb0754fb03d77631aa4142a6d5f74ba96e5f057231f7c197499bf8e09fc8fa6d203303
    *79ed4779e1ada9433b4a6d53286d53dd5535d4b4a81ab9b77caea9c9246fd24bef737799c64199
    *c65a11e6696da53a15ea3c851acb0b7bb54aabbe0ac948965161b1772ea2120d330b19d592af95
    *0e1845bd70711fc0ae958eccb241bb9e7b22290c2b2e0f2cf9291cfa9298cccec918fb1498713c
    *06c2492a82c3feb97d6a6c25e119a1881c3bec229bfcf09b62e271ff19897f89e5e70e9532035e
    *d317955c4b133c8e11b568a070f4d306d7a068a0110d9369539c2e45242504ae402c5cb3218946
    *04ed6c9b225a8822d0c4310a3587e91cb519aa885e8d90a4444111cf180ff28d44f53759001094
    *8fbf99f3dfe5494b965b485c9e7c9be2f3b2c415020cd9670cc84f5faa92051456cdb60c2a7e3c
    *ae4066aafa8584e6cbe8df5f5d4cebb15c86c68a2c0c8a5cb489c36ae3b9a38d9c4d1b0b1f91ff
    *8b10922fd239b91a0160862fa3dc81ccaf7c7e284f10c729726ec54996ce8f4f3097d6e7b13088
    *a3d350b4d132a2ad29968faa23c9613d617ae5c72ab936b3bb2cd2a8f2b33503509bdbc3ec4d35
    *fffba49ee3236e5e61efa761aeb3c4f036e257c9eb627709e618d258d22399e4279a4bb6d17688
    *69bb228f1c47593842516591d20a85d4882245daee6cd26b65e630671d037beae0573e60c9d39c
    *2c65137d34f61200cad4a5138cbd7fec0aab3aa2ed4a05d5630e1de050347e5950e503cb1280b0
    *732b706a28f09af06ab193435b0fb43a2a782031e53d478d7a60f5678d9ea89eafdd2c159cdde3
    *db25bb854e70b510ad2db01e6e15613c9584cb8c146c7295c2f2ccb144e9c05371c19a6b8b8a4a
    *b6df57396dd24bc138f541905beb555b5f62459701735a03449f389680f1b902a3c2b65c0f4c15
    *19b5983a22f3ea92e8113791642921507ed15352023a412d045ae4cdca794ccdd87bb30fe4ed8a
    *edf946306bc0a96699b61193786436128c82bc2fb06acfdcaabff585ec2dff7cf7ff643775832e
    *8016dcffafadaf96fdffad3f7c78e7ffef567e3811de9217acc30f3fbedab14cb7f082161864bd
    *e6682d01cfbd7e8d06804f9f80e0ddec3569d3853f19f7fedeeffa45477bcea0c3cdeb77473b79
    *972fd2b1d80bbcd40873bebdb6aeac451e4e2121c848136c20763f87d9051d7082f1bb789eb7c5
    *598662fab108323cfed385b73900a9db9e5c8ce7a1629b8dafbfcf882530cf9d67cf36bbacd4db
    *9ea2c2785bdff1034ff48376bb929c0517836c5e00b7940f60517df07f47a31c48e8c159741a3d
    *18c6e9f183599a17f903645ddfcca743c8b7fae019c3ba497a70aecdb575b77b636e9b366016e8
    *10f9b60f9d8cd6d0685bad0b6326e871cf77fce464d38f2fa007d1ccd3faf4126d13eb8d2518a9
    *af671ca139cbd747951b3a76ab71c00e732ad781a55c3f1d9a2b61785926bfbcbac6bbd0254ac0
    *3c2a425307bd2e57c6aa67a9523f65511166a62a7e5fb29455992c77f9cbeaaf7b2bedbba13ddc
    *dd51452ca72c8377b05295f35f9dd658d97f650b96ab243a41ef28b0ce486d7c7907db29591b4c
    *7bcade86393a392fe1ecad0516ea13f0c5e1310e9327a1fa716a43634dee69775136d2c5b5b329
    *dcec5c3f4f7f69ce00acf7c5304438b24702715f7486e27bbe38eae0ebb00baff434ea6ec9be71
    *702a2f497835ac6bf524fa8af89a5d5ad1ea4aaa9e902d004cbf479cef936c4ce28d2d18d6b7c0
    *57d7424caa9fab8df0b7de5372c17096f3370c6c05746988b7455b6d0aa4f24662710909b6d361
    *0a278db64bfa6ddad4f5c64c5b03a9ea09d1a629d336fb32eaf1d15e2cb7623997aa7805d5bd8c
    *aef89ee93d4b04a68dfa5be6e4e01ecfba8b3352074346859054c8ee59b5e9596d576c60d55458
    *ce50ae4835d6ab854f55da3bb15db5f33dabe4aca2b2a8c0e551238ec0c6893f4c4c1a039d749b
    *b210a29345a628fe75ced8654c45be7066555787baf2cb4fea3a08759466f267a51a5d42a9cbb7
    *6814ebca55fbdde49c60cedacd5641e81ce22d07b4125a5ae8dd2e7076bb0e6fc74790692ed0f6
    *72d9e2957ead00f2f3811aba3e37583b71e2e276a8982cf8f788f048ba9783b07f6d08cca31e89
    *7099b267b52d41a614fe3b82413e5b0e8f5a58fb37084b329292c33c0278d7c2ec2ad0923a82ba
    *c6e857605d830e3c0bc8b528a2dace9b18cf6a8bbf0ad41ba2972ab67eb88de71b53a7d1eeaa63
    *eaddab976977d9d21544cb709652f0f2b2ea7871b23c87a8b22f73626ade812da3af25f8735f17
    *f8012cbb83d714afdb7eadec4d6c5a4db6459b6f4db1eade6b65346a7ddf5a9cfa87fbf9e4ff4c
    *f737e706eaf2fe9fd61f6eacdef97fba8d5fc3f82b779bd7be095a70ffb3f170a31cffe1e1c6e3
    *3bffefb7f25b68ff29aa169fa2e6c247786c3eb5cd1999f1bd61d5aa1718c52742f3a1926de9e1
    *289d8563fcf8b7208b108f6f63265a3231b9d6fdd1fa57b93a4ad2a46fae8fec0b23b18d469d7d
    *a3184506a346b68417dd01ba6f4f13f4f54a861cb489a265071a98ca8b20d9075afdae8d7aec6d
    *116018a6288162c985380b2e72a93b9785c53c4bdaa4201ac83ba8b618cec99c338ea6c045b215
    *678afe1fa042c01b6961f095ef7f3ca6913edb49757d6365434757111cb3518fae871aadcae650
    *6af63bd692f8cdf930030ef63d94d76688d83dd6072d3a308e357ab6a78baef79a48dd42d80ea6
    *7d1739c2e785cb27b93713b5d3f59b62fd7eee32ee2cec4a823dab8471cf7fe52b1f125ed35427
    *554f19956d1852acba0035bc27d1f98096175bf966abb4c06cc11752e8858505dde259c6e70497
    *9618a98dbb85338c569c72a6e9d6a0b29091c5759ca708545a761b077cd280bd0846a77d8a70c7
    *c1ede48246c12aa2bcc085cec134e5f07878b34ed10332be5a1f404784b963826e0cc375c43ab2
    *5237c6e514fe700a85600b80ed2bcd95813906a6a3e87630991334a5cfd2196c6fe8a3edc2d54d
    *a57a65c8bc362e39f26600d72058bb31bc07c0c4524910a7c75ad915e3922417d3144ef95697c8
    *d87f143870aa9773bda2b3907a1cc6d1108b84a850fb19b941319927d21f9b740f0cb3905c36e4
    *298f6da74b014086a8888d8364ed94b401c4b1f12c006568b3807d0e9090fa56594e00b0457c9d
    *316511396f0a798fc0a8d35f0fe1be8c32680602dc0fb03d300452f78d6e54b6822d798982b731
    *6d7c1f789d109c90ae3890328c87d411564e117ad45d5132835d4b76acc416695c065d815e422f
    *091cf5527a40d0fb2716e19e86019f6366848d010ae79a4c0032d42ea1e7d06cde076de376a218
    *136f02fb629a42a33565c96d81bc2244b972ac802047411ef64c60c8f00c2ac1b03b8822a6e56a
    *e04e204f0c7d00c434cfe99e02e7086e2b5161dc440409000e38f0a3f4c159b1b47daa7803b4b2
    *254a75bd27b2d84276e4085e4bbee360e7020a40dd515a056000884950f354ba8a8b0a56bb3796
    *b14a113c24cf0f5cd629491d2703933a9e1fcc5c2640a4290fc02ddb5b53c1bb2c746a48137f1d
    *e3390b2dfcce24081ed9489a46704b4cf3361911b69f1406b3b259ee5c711104cf36c5a5943a05
    *79465b6deb6ddb5d48302928102873824446d221871a8c7c1e158a16a7d466ddb441cb61884861
    *53db714fbc3aa48151199d4895e112903a0bca25dba69a1206b027c859ae771da6d69661d99640
    *792255aaed520643ee77c3e3114066c4a63d475735b14c0a4422ec329b9249d4e3a85848826671
    *7c88610dcc89484cb14d624235382360b5e662cf9a985216acdf3bd35e625b80d030a0d3441e90
    *f31eff614e95337f4482fdc899a6faad072d55cf5de5a51189f7a32cb6498ec0f80ba0a49f93ee
    *3268db2fa9a70dbd748956f444b935586c717b7a226d6a1b02a96d9df59c5ebea5f6cbccdbecde
    *ec120df7750002b85c17c0c1a7b93b10e4521d623dcfecce318d746dd5e7f61cb297c7ce538948
    *6eb705debeff5efc7cfe8b1774a7d2711f101203faa0e0b8df1857f9ad0a1463ca886d3c349751
    *868fb5f98191aae68f634f7e5e5483aee8ec26e3d435f4960531a155b9df086cd2097cfe096571
    *724588ef1e6fc156f98ac760591c9d033797f4fafb95a5955b5f4fc359ff065b2e79444f714af1
    *140e161682f5f37fcfbd65ad8a8925f581c0047fb58d4574a5cb3a512877a5732be6ab85453045
    *ea4e951fbe740ddf01ef5f9e75c5a5d51aecbd29282f4c65a584ba19acb6ada5aef36cea0b3ff9
    *a92ffc34f0b71953caedc66fd076cfc8a1d950c56783ac43fa60f05623d3001eb0ba765d93389a
    *b9a9c87712f7388ce0ac12651930309f83c4a6a3b75975de56dc3be896d7a054c207033c8663a8
    *271a61387a3803a5d99823c8e3c141b4773fb5c5380df3a45d080a15495c555e64302f29746648
    *d20de954869a8714f1852a02ae76883ca6c09a73e66ef5ef0b07873f8bf2d0c10bb3fb269eb41f
    *f3ba9a90ad9e53e0c50b65c9eded80529e9ab119e87c033727d90cfd998015680bea0ecfa93d3c
    *6cade6735251427721ae4b225a8f659344691c1401edf25a3af9117df5daee707f73fcf1f2a909
    *2da1bdb7e6f2b90ad1b45f9e76ec2a2ccf44e623ba54e573ce0267bf2ad3d0e1a872c4804464c8
    *89f091a35b562e3073a901613960a6d6818a5f858c159d8a6145867ec9ff08b7d20df77faed2e2
    *35ae0117f97f7db45a8efffc78e5eefeef767e3768d955bacdfb467776a54823bf7fd32fba22ab
    *35ff123fa1c8781cc2be8a3ecaf8f2aecdbae569c6dba6de82c31ef9c7482705944942b4fb12b3
    *20ca94e3572db332f5b17b972c14a338cd51020ccc46508463dc414e492a28b6a4438c2d12fba4
    *4928459af324873ece27172c3c1c8b0b8ebc16249094c868dab32c3d06e299621eeacd81309e6d
    *cb4af0ee4502a11691040a25d0635b9a176851a8f40c5b28b126c7a486dc452a4e82cfa1be09d0
    *70f33825593d09aa297c4b9a0c48228eb0420acd9b5360080081f549c17559108a67b94a132416
    *c8c192531c5756c8825694afb5f7d363659e97b91065de1a48a5fa2c88bbe7b30a4473bd87634c
    *972691ec49d92a9252d1c5cb6b157a9cfa7712e427b8bb2114e94db8d4c1d184eb9557bd7af094
    *ed21207cc1daed48b025a5b5b61741bcddf1626949bfaab8d2ad8344b719550b0c21dcde8e8b30
    *4be4878288a919e79b5ccd7cf7d42593a8dafb6a37f63039c72d15955d24af9bbd31a280c67b82
    *ec4b6aa1c0203a17e440b6188784bcf3c25fcb37af64a5b080af2ea04e0c054205e1efa5afb7bd
    *6d778c27b56be345d7dc750696ce7d2a4e758b493e3c7a5d46d28ded7e09234b7cf3a7ec8d3144
    *30f0be77c6995fc33873118e4756a38e96c86d37e7e8cef45301f08692b26ffd706fc58323fb95
    *c2f547dfbe29bfb535514de4b1d2fda66cfb4a35c8702aa90a9d8d2f262014bd5ea84c9d0b9dd0
    *1099c85f7bc35991d1304745858bf9621032dfaa117954842b7501666e4cab3c94cb72001f9784
    *5354f57a2ab6306e141a6fe25f3c39531c29b640dde2b33f7e99ca94dfe41a2fcff88b7a451ef5
    *0982f7808f29aa03181373582f61a41a3cf43558f3b05e8ec86930869cc2f6e15f044f21a8d87c
    *553618bf4c65ca6f726ff234d8966994869f2054079d3e1b410663a2da55c2a74668b10cf14983
    *d84af5f41d1f99855001e364fdd580716e87f3d5a53e252cd5113f4f7fa9602145b9563ff06cdf
    *14b0a615afd7d4d5f5723dadec6c6fae9ac457cdde5b917ced3a0e71f74021f857af69ff266aa2
    *c38975015d4f195e1cfe11cdd091ae0f05baa1ae4160db42602902d9211967e956c1aa478be77c
    *5599446ced9bf9148eef236f4bdd5af142a05cdbaa5341e77ec3ac969e0c2e0582cae0e9dadb0b
    *c4bafaa68907e4d24652d575e7d3b5666213b324b5e68a13e439f4e1be8dbc50843a73a8d1a556
    *28f12ac84fc3385ece7cacdc8a92ed58a5395a126fb7e83ccfcd8e9c63db64684ef167cbc35987
    *44f213f8d0a65c03d5f42e0258608adbd4f3ea8c70330b61a7b17f90e315d9cdd674b6604c94f1
    *a5b292bccdbaf7bf42dd8db3c83282bd8dfaf66fb93e3eb18a1bdab497a620c774152d576f9586
    *be5aedac4de618eefa262cda174f176ef7e26ad5962d87eb66af6de4acfc99dc2e263e73ebaf83
    *494d4f780cdc6f8f107ce6f5b757bb6b90ff35ea5d48875ef3f56f3225fc96f4d740a5c23b9070
    *72a963c7d1eb6b8dc7151d9cf8fbc5d504ba41b43c922b71b953b563115fc1cb4a55f20c37beab
    *640e9b63bb9a13f7b7d41268b8ff4796f646dcc036dfffafac3d5a2ddbff6e3c7e7c17fff5567e
    *57bcffafb7e9fd46d7fe7481f37bbfecd737df39a9cff9435170308ce034742ec3a774249e9112
    *2ca524e1191ab029cb2bb2191ba3e7b97842966d5891b6f48a48b160328fd9020d9504f86e5c1a
    *3515a90af412a3a9df85891ccbeb43106b03bd8c6cdc702194f7b439dfc0a3c1e04c594d491328
    *697f462623148541d99509a8f284db9a70ec8e7bb21df7b4c46520fe0e68e24deeffa0262c54b2
    *d59607ed369ca63fb265d6c72d44c949b1e3fe4db6188934b7ccf29471df30844e8894b955988c
    *82593e27ed07ea391230d3b5319a7948433c69f181d633c65a2b52716925315a965cf7d0c66b86
    *96999fc3f8e2968c9d693220652f8c12db23093049917b4a8ca1ae666bee665fe218a6d9e05d8a
    *8a195ea3625583ff7a56075861d9b59242ffa6c52852a770ac561479f2ead64801d50c98faa4e1
    *5a0736b6e3ddc93670c526334a6bc44482a1a8f32c1f9fb89742b2e5e5d233fc5cad0b56247f7e
    *693b68e447df820368d8ffdf27a8ec72030cc082fdffd1eaa38db2ff8fd5c71b77fbff6dfc9cfd
    *7ff940ee0bf67fcfaa43d4b4dca244ea24949f747d76949da2d2657915e4065a4f98e3019930e9
    *ef94a743ffa267057ae8365760a91695eab2224a537dd6fbbc94aef377f493ae1f5ffcaa2fd7f1
    *2d70132e0eaeeaa0e0aa5e196acad13d112a6070a0c7e6ad677158e06d33b88e092befeb34246d
    *6368cc8a0b6ac885b358d3a91c7626de584b4158880430550d1b6a31789f71763401d096036c2a
    *40853d8f8bc0ec7e62f3909f038a9264fd590681c089e6537a5804c04410aa3ca9a23aef846d56
    *f11f6bc7d403a0ec3b9cfb3ca54ea042f4e9d9cf5075022f051e9b0c035ef6a60fba1fb40faeea
    *6a0d167bb90af0e75f1c4848df5e145d5855a31e050f8d64aa08e2d732540dac62b66475a51f9c
    *4c9010a58310ebdcb2d569535abbd7a6c2edee96e6eed41cda944fc4dfbd3723ff2f9671192e6f
    *f7530f3aa07778929ef55080e8d86f9849d9b5b54df4378fbe09a79946f1bbad6dc15f863a2f8a
    *65a83d65eb9152ed8ae39c7811902ce7fbd230289e934b54994e895ed76033419fbd55b6d30220
    *1cc6b35ca3e13ccb753aace77b6b74dfa5f1c51423bf4423e31f40dec19e85741a939e57e0497b
    *1a615d6b7427c1949393a2ba5c4e55bb273661cb984c0623df6aa2c33fb165ab346fad5b59975d
    *651554bd1e54c02fb7f436a328dd1a983f66c2a93298e699a6942c5b620db2295ab7f4b989862b
    *695802a9082f83ddbacaea6b2a5553bf3c507e39ebaca5422a786b2a9bcce3183930792619b84b
    *892499a922747a378b8ae9d5e9e2a5a52789b227e7548f64fade29cfd596effcece5472156bf08
    *510e976d34df2b0b127d1d3a653b956e8462fe25ca8baf36432434ebd1b6972e3da830efcf8204
    *5def886098a7d910bb74a527d9285e18a4b1891d8f883d1fa1d504693e4e8c75e8b73ef3dcfdcc
    *afe1fc0f33e666a2c02d3affaf3f2ec77fdb78b4fee8eefc7f1bbf2bc9ffbf4a0c3729e46f16f3
    *034d729e25e5fccd92fea564fd0ba5fd8df27ed5b443740c57677f979fa4f398a4fb432846aee5
    *4a22e57b0303ebe63add27a7411ee112629ad7c1b9147bc0137012e728ea803fb66150a42432f0
    *d481ff284b64cb62a0c0bb2c4a33e8bfa7f8421bc9318549397b80467ae8a72c2d8a746a2a5305
    *3ad6b3ac5cbd7665ee29ba2e4c946302859455237aeeabd658a43383b8a9ce3ccb8694ab736aab
    *33715a5e8caedd012987a49cdc53ac404f721bae6113459df3f364d3e01cb830e894e71814d03e
    *b361d707c4d99d336b850fc054058e38bec24d119cd0e59fe82cdb133249fa01517c13d5e3e597
    *304561c62992df413767e70b2bb04cf82b7548e6e6b503469d4e30b7c500ab439904c278d51dc8
    *7459e734e6d663ce626e6ee7244645aa43761c7d0e13f4d3876317e1611bbaa23a7664b6b9497f
    *79eca2e4ab8c5d94d48d1db9053ef78e5d945c6aecca75a8b18b7c276acc5d3d4f4b188c56edd0
    *3945f5d045fe63b49bdb1d3a2ca2d719ec776b1d82d39f49da7452dea4a4e6dc3853651e3c3191
    *abcc2de5e332d89234abb3e04d2f8a3679b1d4fe2dadf96d702a61a2e6bbfe406d2007478d14d4
    *f509b0ac896e2aac9bf095ce689af715cf379617a6dadaccd457e9fe254097f690930bdb45bc23
    *73d52d0f1eb8d632a1538da7298b8cccfe4261c20c1559090ba888d68c2b50116c805512b2f129
    *a1a1969d2548a8997cf0a1e3d4648fa6a7e502ddaf4d6741167ef4276f8addbf2e53f883f0fc36
    *c58f4754d89bbab0e6fda34acd1d1c686c95bf30270f91cc022bcbb071aad57597bd3e2f9a6a91
    *571ced9b6a75b59995ba69aa59a5bd2b7769aad95dd338d5bc70ad65bd3cd5bef5f1eb9bff1ace
    *ffcacafeda428005e7ffd5b58d47e5fbff47ebab77e7ffdbf8ddec817209453dedbbe10fa2acf7
    *9a7cbc077904e772e456b3bc48535817e3889c69a310f49e5c40ef91c8f31eafb7f7949f9b67a2
    *c983c5ad9ce91d5f21be73bd9027570c292b1f7f0db3d47b80b5034a103f721e8b47e22316fdd8
    *6ae11fdaf62d052dcbb05f7006edb3bad5c27aaa05f8f3a6d2fdfed6b3e4dff7d7a4ff3d3f0e6e
    *20fad362fdef95c795f57ff5d1faddfa7f1bbf9b5d7c2eb1fe0f88bcfe28bbc0e105e41ba167d4
    *1cd1a6651f6357d84ed9d4898ba35054dc722889af7158962613c850f06db90cfaa1a348dc7b97
    *85f17c1cde1b94f71199204ea2319da63adf777b9dfbf0df3fbbddda0d47f5f68d8bedbdfac754
    *59dd665376d12765b4563e945d0ed0f3d6e00dbb919379a0a5eae9be7efaa75f9faed24bdc433d
    *80e1f5005542aa2c4a75d1a9d195ab687f93ea5c79abfc5ea8e7c7e27eab0508356e98986eed97
    *d00ecaee5a2c5120cd0c4bf03f946d53faf66a41bb1bcbc86671c94cfc138dc794f317a97c3dc8
    *422e19b28b97ac8bcef9bff5ea75f7bbeeaf61ff37f66ad7640216edff8f57cbf13f1fc1cbddfe
    *7f1b3feffdaf0af4e855fdbe8447d86f640b66b924fbbdb2176ef8c6549baba22b57b457edb94e
    *608f947d98c0405aed9d93206b5bd16fd8155622da7b39b7dbf01b187d2b52ce511114c5211b47
    *59382ae0444b9c47a57a11a3a57210e7b764af6459c62e6bb6648a58c6ba781f6bde9a5d4c36dd
    *bf36ba92f41937bd5ee065525223bb1cb38d8b5db360929f5befcb3957af3356d6725f3b83d1e4
    *734d96b50a5ab3d1728d777524c84ac8242535a6c45a2c55a80d935c8d57e405af68bd1ef4c47c
    *2f55c0b6831e01b295ab2a3fb6d615dfeda0b7ac7349e805a064e2dee24a246e25925d9a3d2c64
    *9d76d5f5bf61ffdf0166ef38cd3048ecf5188005fbfffac6a3f2f9ffd1fadaddf9ff567ecefeff
    *e3f68ba34b6cfadf687bb7e8f277bbbfbbe2839bec20dffe69f7c892fba7cca07d1933044b41ca
    *b2f0e3b8515cee477ceed0bf64304c4f152fd074f05558854aa4bcf3daf6243d92551ea5ce675e
    *908e5207a38587fb41b78706c28bb7eb4a833d57e6297b0b877d2e655b887c9af39d3985774d87
    *ff83c13e50bd04fe9f0d2358e133e4ca24c8f680f779ea1a3219d894cfbfe91ec3ad1d5302777b
    *5720584b5feff01a92777be754d981fc32b1766afe72ac33c27e3110c73a94a2a5949893a53d8a
    *b27453248398a856b39f7c3121f704acfccdd22f5c3ab8d93b9a4749446adfda7ba51c26377486
    *c46957ee99853d2824188b8a1cf6ee5916e638f1382e4cee20dc2a9315d66a2a996ab14a255fe7
    *35311662dac23571efcdfede9bdd0a91aa25cf1bb5b4ea9d16e9234bcf649a4520652a5fd037f8
    *bf6a994de8531bd94a0642d6cb3bea2c1d5d894d5bd198805bdce26b68c000fe1d524283cf5a0f
    *83eab4c34bc251595f0c26b4cd008e6a99cb510378a58a50e5287dee03ca70a665489a40c4bf91
    *dcab81ff239b985bb8ff79bcba5e96ff3c5c5dbfb3ffbf95df8dfbffe979a448bf87b840764889
    *df2bd7e84a851c0990c774a0e60e2a18b76f87eb643f78976438cd850a8f95e11cb7c93390e215
    *f9adc37f50aec34fead607c3de6d9bc0da8af5e4d0336ec412fa7c389f76d403f1adeac5625df7
    *a309057267c472531c4bf6b8cca5c3965cd36b8edd53be98208a8b4b449bbb032302016d1c93b3
    *a62205ac55ec238cd113701f33b9749e3da3fb42a1fc344d83046919d85f74a1f4fa8364bad80e
    *4585c7be37a03045d21d14bbe8e328f20c8b452b635d15ba561a47f908a6563836269ddb32d41f
    *eca7db5660c16d2baa60a75b917d0525ce4241f1321532b123dd0876ba3c78dbd57882db2698e0
    *b68e24f8ec5985b309ca2c03b91af762411c4350065842255041831b107051e6b8c3d57c25e0c4
    *151ebcdfdf3d14f71013ce7c4f0710e6b2b8105b19cd9cbaa7c24a9a4f985928fe7c328946112c
    *626806fe991c3c86e118a64c4ef1c38651329652ac44c6a76a23203858f19189013afec6187792
    *9b12156dc39733f49729325c358279914e615ec10117eb64bf63e8203ce75a66699ee396d3b210
    *061ab2c6097ac51e2818444d81741ee890d5b6fa66c309cced2bf1c072d9b18f4fb492b4053721
    *9041bc54182c4d40e5c81cdcd2bd82a35ecdb2f47334964edf6a94073864999ecd1ceb0bb0cad0
    *8ec202cd90c9fe36c710a02acc5b09b340c6d9726394e13543ee8f7f25a738a9c1e18a01fba2f6
    *01900f8c632fd52574aadb34afbfd92b2f4ff26009636d2ad1d388572625adf9ceba6023e05d1b
    *a65abdcd527e26edb70647af81d78d695d5d970db1e05b68946cd8aaa45b960e4b487e0076d086
    *1a201419c1899bdef9e1fe33523d9ff9812a61791d40292e97106b07abb48ad6f5a33ac5c9e4ca
    *0031c0d22021b9562961d9b225baaf40a1a91f4dd0cda20e7b875b745b5a56645b34f9b6265b76
    *543c8c68086bd5d6447c7c8d2e462a850358cd3094813d8fa4c783d76a837caddca75cc5cb8168
    *98493a1080cc5572b4a291f64ea72a959b69554be79d1fc9dcb254217ff4d7779c84c7a8812281
    *aa77ae304ae6f6b4c2572e94cf87ea0e4626ea4fb5320617274bd8e0c5cb1bb8dc02bd1f42b5cc
    *ff6665d84e9a1ffcb9b83f202ae05677f0bdeb04c9ea10cdd655e126d60ca518dca7c053b20e7c
    *2bd55107de07f9df4842f2effd6b90ff6829c0756540cdf29fd595c72b65ffcf8f56d6eef47f6e
    *e577a3f19f2b6ed77b62e7dd3b7dce78fb0e83cc1f7ef8f1d58ee84f92b47f1664491f6f5882e4
    *5b898534f6bf5ba150c579f4288d31dabcf4aac3dd678e08302e712059723a2fa81b39cbd304c2
    *093f4385733a4f0d436002f3133cc507a353314ecf12e5c8394fe719009dc1f7e03854fa406217
    *06fa427d65c82476e03381115145c908efe9e4514de54766244bb06a13a698f33d95eff7ebe45d
    *76c061cb69b6a5373d2d62559106b65d0567a0c930046d0d9740cde86b7f7d6030aa2a57499ce6
    *b398a3125b5928547645af0a7da7c1700e96c3cc44a76a6b57daf4a9c08055aa371775597b2f29
    *da3dfa8381c6e09114d4294a988a1fbdd5f9beb7d2dd32a0dee07996f23d8f8abc02f2799ac66d
    *79f586cf6190b4c5c7efbefbf8e0e3972f1fd10bf934b2a33cd3a5a1940022cfeb1ce725918c91
    *24b30b3645267a51dec2c96b1496cbc24ff3280b897e5184459d62088b3d864b672a6902a0c9c9
    *3990b2149d15161a1740d9393a64063e1efda1134c747355a6616c306616382de0b0344b739e08
    *37b952f9e4abb6369912382e0e2efcef1b24d817e4f7caa1802f19ecb614e1d64ec209d2183afa
    *0a61802f17a9b7143cce7bb43d734e730ba3e35c4150d258e1ad55b428fed44dd7b728cad4a5ea
    *ab9166d54653ba09e00bc254dd44150b62512d514563686d5dbb89fbe8384670823cfac5813eb9
    *45e7d90f0d31b455a576bc23bb5237b8d12221a4a34e81763b193ad7f8e1cb33315c6aa5d204ab
    *9562839e51901d96f46583deb0464d16a5b51dfbbde7a43af2227f55d6f3a85a6d6f74b58aaf85
    *86f53cf6a1d41bdf04523786a2f51cfad1ed85378f70197dbdd3955466dc68b79a9457ca93e77b
    *8f525035d4ed92e54bf16ed5b2588d737b397c90735daaf0972f2cf41d32ab4bbee2881fd01081
    *5f2e8363bb3d2a4baf6490d7f9eebbae94e9f549dc762ebefb0e7da40a5e7eb480133ef1ca30cc
    *8d7e541e1d27f3a979c721539dba825ae1419c8795940f907294cd6d7577e4592af80ebe1b7485
    *f959c876065fca49aa59e7c01d2370fe473848601abdc97fcb691f2c7f3a12457c447737ec7448
    *25a9cec84fa249b18fae6f554a80ddd781251346ad6bf21c2c914734e7c9520a921a281c37a50b
    *e7615408fb077db1b9a9e086c573baf6b5e07ef9e2c22dc2dcc9e4ab1bea388c7e0d75f7a8d0cd
    *517e0814003b9cc6893bf41af29f06f99f65c7fa55f5ff371e3d2cfb7f7db4fef8ceffcbadfc1c
    *f99f5faae7686ff9d4bb960f1b83e92f836984d7f74636f80d4c080c69ff6ee57eae3218dd074e
    *74d739ba61ef0b2c14f954c21ce19f7238d0ec6fa087204b3a3f3d71cf3957dfc3a06b212c3db4
    *7d0c68834ed8652a39afa5732bbcea6379c589c1428379714ba6131625d056276c85b0bce8ef47
    *a79a617847e1f7b4d6192a3bcdc2a0909a62da425e19385c8c8034f4c9e1afeff776feb2f36a77
    *e72fa686bfcea3d1e9ce49383a45d8400e85b19698c1870f1ae607a2cf0fe3082589c339a99849
    *1e0db32f3290d070245a3d897aa3c9840f77618412793130f86b8651aac51c2b05d14009aadb3a
    *becf8050680ba521af2d2894660c3a0d04628f62124387d914478805a364812195cfd06b2fbeca
    *3d6cd022b87e670a32ed1cb9a9f3bc2d8fe8f884efd6f10b3e2dd708eec0afd00a064c5125c28a
    *de7b28cd1764a673465fb506de50a10c3ec3f3d2cd60ca686ac9f63898e17ca6d502c1fe705214
    *b3a70f1e04f363d840f37c308cd3e37c9616b8d63d80f5f2c98395c70fe2142650908cfb135450
    *ea47937ed427adaefeeaca937e940c4e8a69fcac655c4b609b8d1e8266fb397e300d64c2a3698a
    *9caf888b159eb45ff0e907e284c32c43c75c3533dd34fa2973dca81e1387c9717172cf40427ecc
    *b8a0e2cf29aa539e45c4cc4eb86e4a316c34fe2045c810ceeaf7852e5c88e59fe00dbe45705dd1
    *b9101f3fcdd3e2a358eb964a5d201aab38caa5041b93e32a4400d917ab5d03d702704ce8fd5a8b
    *a0079c85a0f8b51645ab5039d3a5d175b2fcdab5ed5ccce013f7e05b61172e9e446abb9f2cb91e
    *3c6d6bd26fa23efa070f4f4bd432c5ae6e31af6ed09e62ebbe47058b4df7b3dd66fbfbc5578b11
    *ddc0ff5bba635f95ff0796bf6affbb7167ff712bbf3bfb8fdf2dcbeff0f88a91af1a7da0eaffcc
    *52166e4badbff62d39efb0554c6fc218a487de4e3e87591ec41dfd84e617fa4519816cc74507fe
    *23eb90b8d05f67b30efc475f6733db604403b8ac11c735ac342a212b95dab846465a6cc038968d
    *369c61754d37eed79b6e140c38fcaae61b1a7b0af067de4847d5bc92a66ad98ec32698892dd0b5
    *807a85ba26bd434acbca8cc27cb7ef51ccd7a15b3610f74ba61d158cac7859a89a5c8398b6f128
    *0377b0d3461e0b11aab4c5587b54723bd5fc31ec321cb2b07a984c339c2e8611b0098c02e8b181
    *86f5b904b36ca661267bc916462768731803c463116365b78c62dc227a52c332e49881c03b6a3a
    *95ac386eca10a4bcf24fa4b5c095ec421c54bf9a6508d442710f37e9894dbee24245435c5ea3dd
    *6a77cfc2bca7bdf138d3db6470171c894dfd9530e383d91c7331781fca2674e4356dd75ee13ace
    *82b2c07ec483049b8ed0f4ae311cd9f629d45796316da84175f86c34b08ea69e2a2d841e5c9549
    *19a4383d6043aa33ce50e0962f58b1cc30202e6d94e1cc1d6d9a015f3da6190644d94603f24b1b
    *0d7c628a86874bdb68d451b4b2ddf052b6252c7106bf6cbac18df2d27999ca5cc30d2f9d19c38d
    *6aa5c67ca35aa731df20c3a53aeb8ded26eb8dede5ac37aa88b9361c55e4241d53772cb6e0a8c2
    *afd8713855181b0e69bdf1c39f518cd560c0e16941c58cc3ad429b7048e38d7215cdd07d80efac
    *38feed7f0df21f39631e5cbb0e12f23c7c5827ffa1e78aff8fb5ff100f6fa07d0b7fff8fcb7f96
    *187f0c047c2d01e002f9dfdaea6ae5fe7f6365ed4efe771bbfdbbcffff46923f49c7030a68fdc7
    *13fddd646ff9e4774ef72c29bfc3bcf24bc77aeea1702a9d17f2d5ef2c659130cdd28b679e7ecf
    *e2e9b7465bfd7bb2d4bd1e73ed534cda420ed04205d9172b2b1f4fc90c855d21b31f6438df7ec2
    *2becf842e4211a554115ba0c1db2219bb473b1ac71185a7bca0ac76deb7c6b61009c26f27bf697
    *df84db41784a18b9c2b10657679e16569d946df29f41b9a6e62ab4eaf4d45b8b7d6ca08c75d5dc
    *318c7fb4df12fb3f7a5ffeaafbffa3f58dcafddfc395bbfdff367e4becff7fd80d1f09f76ec3af
    *ddf0a97b96dcf031affb254a3e077134d640d88040bf5e76d7ff29c590aff8ef1325cb7b6704e1
    *d370741224513ed5c6b1ef8f5e3e319269d8c7b3908049b404e44711119a06432239b0cda09999
    *a567d51a21e1ba6eead939aa69acb3c1aa06924b59fccbaa584ed2a6141d09ba9bd35d84457ea6
    *d6fdc20a4ce57456dc2a9424aee4fc5e63d373916bd3eeed7ceb4c7bf8d9f2e56ad542c6041df7
    *4baf94a3e2d8bfb6f2f27b1d363d4aba3a46378861e54313ce3d4ebf39c49b1a6263f033befc72
    *2bcc54c3febf0fabf92888bf8dfc67ed4efe732bbf25c61f97ad6b598034f37fab6b9058e6ff1e
    *3ebcf3ff722bbf2bea7f5579c2268d302c1fc7618c0ac73be974563604f1f88df91d859392f380
    *58943f8ab908f1939e8e55ea64db228fd0ca4e8cc329f21d99560d2fd2d330897e6573d2b68e84
    *243ddaa3726b94a009097606ddfa07c9f801f05631b425976a250125f7d1870a699968368db40d
    *46a3f9741e0745888e3bb2220a62821325a85f209dfa0fd3b9aa032f6d49ce339c4731bccf6700
    *9fb044af2a6130bd253d37870c166bba19f69a2c3d9878a4f4cc7acee689fdfa3ec967c1281c77
    *e0bb7a562a6cd41d18f8c7b65049b4bd88fd0ca5edd7f7098e8e044a8f0a268d9a86e965daa5eb
    *0bfb1347748af243c4af6442125c0c81fea6f8e728c509df6462c29dd4187a6ba1229dc538393e
    *8198da864021a71c228283a63553349c62c2702c89bf1c662d0c4627d463a47587be2d29e00513
    *04cafa764ee6c9294c3eea83a9abca0fc81e86c764d5aa33889fa7bf94b21b4d01ad22d0f584c5
    *80793242874d3c45b411579b70691b851f455e78fe5078c2f903ea35491d469b631b9871432b0b
    *9d45a18e26d85939632cbeff1ebee33fd6d76c415408898e5729416264b412f8436c29e1f097cc
    *f4ba9d2845cfd552ba1d6d6c0814d66362e78adb2859e5d9ebb4bc5a7fdb8281593a769eacdd6d
    *846163d32ec3ea547ad4818d38623afcc9da5657578fb36e1c364fb793287784da333ca3c5c8ee
    *98ff8d31613a9ca70b24fb8b3d2e9ab66dfb0e39206e414fc43346a51aeccca247094aa6c839a2
    *f22914a7629af359d860ad4b98c7dc7a6ed79f21bb651180afcbec731c995d95bacb4d77baad69
    *a88cab074f9d4e383b15c1eea65741da102eb70a1aad60da736825e427d30acfb2d6e385402940
    *752f41c3b29e0a0db7ff3b69ebcaffec2561cc52a16239014cc94514bc88623c085628a606cb6b
    *538ea7ee7acaf1ed29ccc9993d8500ba7b0ad7017b8a1a71b3a7c891e73f14ab50ef22e7cb922b
    *1a50cd72813c20eaa66a599e467178213ecac5eaa3a63ec52f1101ea97df84c54aa9889a0bbc8d
    *a7d1f832e4682a5eb8aa2e5a3a352845753512a28a9cb2060957c4a8f30c1cf16d7565d619ab8b
    *b34ea2b135f85214ca6a404d0f24a57baa92bcc1343de54c284d6b44979c14fedeb9c68a6a9128
    *d01f4d198b1089c79674c8cf920cf9e52b51a1acb56e59f42d78aad015c8cd535b99da38cb6262
    *e37c3e5ae314496a12d55a4a2b83318446293574562e5522b372d1662af3744a3d91b1df860bed
    *e7126f2a54edccd8cbe3b43a31a7194a90f3681cf6319d3d79ce1300d34fa0207d54f71b2d7d5c
    *245357bde1a3b3a9dd389cc2f0ff5f6a048bc45df5d9d297a4f2253536b1235afc3bd35ed24bbb
    *bf58d5e644613f77ce7b16e95ff47eed42d3cfc50f7d918f8224d60ac7b9887348e9500e48cd72
    *f18bed9e28ce7b59dea50b965fa399e898c3094060c4306e1d6dd40bbbd7915678ba17d32bdd4b
    *4c8fea5e7d72beddee35d57efdee955b79a57bbfb5ccf2ee7773bf25e4ff87e403fa5d9a47388b
    *ae7011b040febff278bde4ff7d6d65e3e19dffa75bf95d51feef91d83f0f92e3774181962bdf5a
    *52ef52ecbf89c87e2f196521c38a2f8075648f32a188d391f4f64e5166a5c7f64914a317ed2c9d
    *1f9f5096d816b06b9fdc002b3d63abf250598f0293822ef8e685be13a08def4f52144f92775d29
    *b9cd3ee1ca64ad007618e2c64a7eded1aaf4730818cf67e3a0e0b35b0e1b2566204351d2ae44c7
    *e871687a4ae91952fc2d5bf5523992c280cdd2af0d6c4b6180b5c2fe8eea9a0a2a5e2e20f68186
    *1695a1416f91f36fd8291128963612b6026d31436950dac665a2783b7919a1391819619b069b8e
    *bd0dbfe03554befc85444f203b73140ce59b0ba8030f3ddafa7b3b693c9f26790fb2769dbc98ec
    *7ce09ccad6be9c27f7e431dda9bec0d9c7d3a43a337d751f40128c7cd16dc1b5ae20ec6b10f8d1
    *19cff403b04c7b49617fe586caeffa3ca92ec18022d5b557f5caab7e320f2c156674799fc6171c
    *9c7ca47c009c4640a900dd868ac4cd5eed53e00479fd9255911ccfa9806e33dc216002d7f28a4d
    *58c272fe861bc7fb37efb677fe42a101ffd3ea107f92ec1568c53f315e6530cce14311a28d3857
    *452d562bc869929e015fcc66ce687d99b127b33fd15a348eb290d6157112e06a837781f08fc6f3
    *8b144c5d15492118cf9fc236d491137cf4d1350a000f0cba20ede207568d72b22c045cfbb36aa4
    *e00554ad59c4b0e1767d30299beb5ab2851c24017a799e9cc0021fa35a3c8046a17008348a4bdd
    *a0743545120a9255ec7eeaea70e8b865f036a0a898ee93e11d971b9cf1c91877dc27fd11e310c4
    *eccd14aa6bc915090f53e86218ce3c3879d4d7ff243f67e27bd17922faa273de475751b0d47d14
    *4f7c170b251a2e0916a00144c5222617d544d29d633483840f26db0725c494d9f48b93458d3a65
    *d12f4e166cc039397b12f2d123bda8459985181335f5c4aa58adb6f81f619636b41afd8c1b0150
    *a534796caf2f8d1ed88d7305db2db3167c78168d6544204615c0b72456ae0f175563ae0fe538ac
    *b01ea61aed0fd6e6ae04d763ddb19d18e80baf2a9c3223fbca4f823565623497f85ec8eb745f19
    *39e266edc4328aaca9f079975c81110445637598ca13b983a9a6cb1a4c55ba8da9af8c8da92e53
    *8ba926756fadd618d8d5fa0a996ae5fc5055b1a412bfb09f685f8f6854a7b2330cb41ab43843e7
    *c220e52b42dfdae2a26d15d15d8165cfdbd417f27ed7b8b13620605b33bb26bcd48910171175f5
    *626b557a839629455be2b822a41f444af8c035abc6afb6f80c3166977224c33e839df638498931
    *f6694d6b3d6b0a8694f945c35efc090dde17d068dfc3e8b80715e911859842d2187281b6a5da37
    *e08cd95b16f3c88e1660bb28a3e164dae465546e554a0858cf8661cb47f32cc3d3106f563d768f
    *28592d605e42ec08d8df9051813df338549b9dd5ae96cdf822a66524117156ff70d868a7186d56
    *3805688ba14bc2512907d345430e7401ff26c58049c757ea0362ba92f97408031e4d2cb73e869f
    *5aa2757422b08ac896c172a7f18eedf47aaca99f153fc1882b97389aaf54a1cbd461a27abef0e0
    *2c7729a427e6f73da570666f7a8e2b6dd1e1cdfa5eff9ebb10d8f3d95bcee14726a8d771efe93d
    *fc83b959bfc6fe30aa85f48104b8e37042b7164bc87f9690ffe112702d25f02be87f3f42fbaf3b
    *fdefafff5b76fc5f84a3140e005752036f96ffaeadad3f5a2f8dffe33bfdef5bfa5d49fefb8dc5
    *bb48900349907f24e1aef6d78f3c15f00f297acc07660d1f6cd64b5aa813d7351643d8017173c3
    *06b10816a374d21bb9eacf23e444e48ec8c20212ed48c52db4788fc3208b2fe004979d86e301cb
    *90b43ccad2c7f6ab61132360b0cbc2591602fb83a756c486cf73d2955c49c6acd4c11d658a1e0a
    *8c014140e27f70cf0f2ce53257551c792b5410844742ad205916f1a6e354319289685bfa056d14
    *6b044205dc4487986476d7562e2f0b056d0cfb25710d53c8cfec2f0d8c6eaa12356fe72a70249d
    *42695872ca96234ad406d497a3f0a753319fb15abae2a0c9275e7c81cc04d2aae9888171d828e2
    *7052f48bb4cf644cdd8a4ff8099344a1fc0db2474e1af7b974d297a752b15ec4186db1fdfca208
    *551852979442cb41a4f4f839424d3712d617cc85e71c2a91bee73d496fc5e884e5f5a18d093945
    *435a4340c370822789bc88acccc8171b8fa6aa439f87a3400bea13ee398a1b61f91ac47a65244f
    *19569de09d23f797075394c0e5b03421b82c3c86c9806e2e71b8e54c41c9a19e27425a22f4b095
    *a39334a558b529770b0bdba82f0298b4b8c23021cc9318633f4c5318df57417e1ac6b17d1cca15
    *1d9f4590308ca33c9fcc63090a265538831e8d63402e1681e5d42e4e31b217ce7ebcdd61d99ea1
    *3915ce956f67463242ef243a273bd8595ac0e821bfceb6ab50380f8149e7f8a8b91d4e2087b52e
    *c8a254c7d4552efb67597a160ec7709c89d3192e5fe8ba9fdcf68fd09827291e0ca3e33e8eed49
    *308ffbff137c0efaf362d27fd227920f8b6712e09be74fc58b39c5574d026c198ea91455e62471
    *4666fd94a906c320601a8a1981398d28dcb051ec43783cc9820b18e59308c32c6dbded24ff5ceb
    *6e01699c049f2318516551624636a0eea400c83c87f3f0d39cce660892b109b2637d7a812fc38b
    *42ad03d0b9d893d154052e495c6c2b8bc14dee788d973bf61e771963931e91a83103d16ff619a4
    *12bf547438b4568f8280f528de57b7c13e7ba171c6a2fb96ea85266f23d61c3c78b9b3fe68edbf
    *b03dfd27b46ef206446581209fd89b122e8a309e345737ec04240fbc804261072e353cdb6149c1
    *8b90bc500139d6e5e99d367a3413a7b50d3e44990c0c41fe67702f674ad1f7af78393883799645
    *544d1c426fe2fd66a836445c89731dea98775332b99a6397f1a5cb2b38b6bd5a51c2fd2fe2d5da
    *87d58afc9e3a5f5899d6eb323979d66a0055b26e2c016ee332e0d61bb3aa1274834c8a5cc051c1
    *aa9eeb9da63a0b7bccda0cc3e20c2f4756ce9facd04eb1723e9ce82504074a07729083871b1b1a
    *bc451364834e5515bc92c33a3547f688e89499390e2b9da54318f20bbc3f46cfdbf2aa845725c4
    *19052d012c7ac00812dbc3ce7df9623860f110054aa7350a26232dd8cc381071c4697a2a689359
    *5d39a71f5f231ea162177b0ba0ee3964e747b9d41457c19c9086795760718cbfc7101bde2c3189
    *a6198522c74d02372c6bb6f494b19d6125613a9233729d893627bb765aecf5b2da303e44e9b481
    *a262ec2140998aff7ce518497d818f47d4e4493ccf4f48fb9b643ef694a67bc213bc826227d3fa
    *86c96c27518ebc9d1f0d82fc4af97070345c5fb16f0699a3f36aa56b6e4df4479c9aa4906a6bbb
    *fe7cfe8bc9b1be448e357525e4e6e95d58b93616c2d95812ce3a477cf1e5ebfdfa8bdde1562712
    *353194236f77390e2d643ea78216f9e86ee86b5e08e0a143ba8ef48d29a4cbce35f4bb84f46a45
    *8cc4a9f2baf1055e7ee0e1dd84af00c40aa3bb8ad234b9a8aa8c234f46a74346bf54ca845c662a
    *877ed47552272675dd93fa50a76ed8a9b6caff12e870db55fd628c2025a4b178b6c93df0dd77f0
    *52d7c8e11a6034b6da76450cd62d0cc44214a692d447eaaee51af5ca0684cbd5ec367e1dcb6234
    *ddcb37bf377611d9b874076c5cb103aa355fae0ba672e673d32f5f7b2f2cd7afbb71729541d8e0
    *d278cf7e9561e885bd0923d49ac2614c19b43e719611d419a054f6bd87f7cebb1831b73312c0d8
    *e2aad26a8d280e5868691a38c5557240e6a13ae2ec23013cb1053023802be7eb13608761adf12d
    *711aee14738cdce54a7b0c1a00734230ff6cc0b380bfd441a5f901d5ae35576bd74fb4030009c4
    *07f96a61d191487454fb3bb21f57ce5761c4c6ddae61edea91029a05b4d69744cbc64fd296c150
    *7d68c4b18aec0a210b446a595f37630c740e071a20cf4b226d63af69dbe06f3e2dd7024f531ecb
    *a6c094716cc917b507264aaba507da3b51287c5989166092d04c1eade14c0652c597f184a7b53b
    *c7378995eaea5ad6fdb578ab33030b15628c3ddc614d1d815b07be8476eda1ae1d432bbb26f674
    *4c96ad0857ad56840dad68a841b76f6341fbbc0db5294035756237f5bf9645045f2676cac4ee84
    *96dbf089ddf0c9fa551abe547de55ee7f66dd4d5f7e46af5e17a9de47efe53f7fa11b19065eeb1
    *332d7f382a7d90ac25d73012a35c9c00e4a2ecb7c15ab57195a6b5dcbb51e500c25f9876c402ba
    *e9e928aff885b0f84c3a4e8ef09ce8eb65fafd4c0cf70920c2fc606dc6cef8e938977cf49f2507
    *5887f7b806efc9e5915a6f44eae7b19d93706a6a40f834b49aa0968e9a4684758d7878e9466c2c
    *dd08c9967956229d1976182bbb6a4473b3274f2756c3cd5252d3f449a5e9f6166114ffac220b4f
    *744e6ed8c4d2789c913518a9c43b569df0c652faaeae6b1aa2d4b5f6e477646668d035d3979f03
    *591a4f7b3930861f4a3d84cce29f2b138fcbe853128ce60731b3cacccc94296595334555c4e017
    *4e180564bda9be75a73e9575ece4d559793a9432eb59c0e849e4164f0503469e1b1c046beb9499
    *3bd7aa73a3a94b369c2ed968ea928d127a3a334e299d5d67960896b35b13ea9434644e979d5306
    *50431fea15a09a7b492c4d9f5f134b7d42b3f06ca85767ef5ca9de065b71a5b1ab365b5f343f40
    *9215305d7d50e2458f480dd4e8683a590ea5231d142272b6d8f2d743896ef611fbd7a102b17bcc
    *e4ce186116c0578accac6474afc3da565b9d4352c3fbd075b0859e8663624dd5470877d3ae044e
    *b994cdee12fc9d22863efcda7ce6adef6af5c2dc90a7c7b5238a91cd62597cc9111d276b770f4b
    *f206b8fffc4bd7f6247028d0ffce898a55383213988b9d70a9a22b255647a2a0f472fe26ec3a05
    *8e318a846af7cc4558176663c2acaa5a159911b719c6dae205a9b1b2184e9118cda2b90350327c
    *e483748805b13f1c48a7abe2744d9cae97c77c559cf0a0433d1d497bf0c51afdae3831d9d7148d
    *60f6697dbe755170be02bd5c9dc82bbf8adb052494aacf051cd07371d26500ec6d41c2d0060dd8
    *9d383085cf0d830bd6982f10da132266792fe9e50ee405818c722f33aa2aa590b9300992feec44
    *bb5fac67d5bf77e6ebf6cfa7ffa70de0aeeffa977e97d7ffdc58dbb8f3ff7b2bbfe6f17f9985d7
    *8cfd8ebf66fdcf95c71b95f80f0f371edde97fdeca6f61fc075175f62bead4427d21209a3d03ef
    *9e47b95469faeb3c80bf93884d075d17c1b7ad70aa67c00067c01f50c7f4263bca51532af50c36
    *d3554c32d6d398d65b1c5a02e188ce7672a14bfae3462d30ed56c95047305ec29e5b05445f3640
    *858a763f1e477668f84f73a0ec09aa6196ba6787e4f914330d9d11f89190400fc378d262fd08ea
    *8d8085439b18757887f84afe2c6fcd649e8f87c44297bfa23567a9c07b0a542e5f7635effe0555
    *9f48056e50e7c188e3eeda83034777c3f4ed7ec258cecff06f876bb40f1e01ca843150b2e99582
    *3d99524ae5eb50967a70c952069fb7d99811c2072f463fd4c2fea101a367b5a59e3594fa010ad5
    *d4251aeaaa2df5aca1d44774d91164e1c73a444d86c61e5407f76adfe983fbae275630129dc7c2
    *31f0019271cadeeb382914579da05264708b5a2925a0261dca47798043170943594816199a142e
    *b2a31e3d26e28456f5f4a327dc902db1f4bbcc302ce7e639c8b9f9abfee8c9cd73b3949b3f7a2b
    *e0aee8aa1652146efb28b65b191255d29db2ecb159b9f19a3873581ddc4a3d629ce73991906979
    *2de7951ada32b32448d98fe2d9331429f17a766adadb91295d955ff6a4931ffa8c33a952a786e0
    *655f36e7776be1eeb44a68ac28997b13532d81b3ddb96ea74a389b18f21b5770db53daa9eb4b91
    *7a8dccec4b3d3795a6f9d69c92e6f6a519a5b6ab0ae1c2f7d755da65cc274ed87a9375e829aa09
    *5916d5890e086f514dd58d45eb6b57546eba7ca2b640954b91baf5731c5a5ad0aa946f163c93cd
    *9e0126bb67b522854cda0f75e2a6a4177b46d5f53e8b85ec9c436fd952f7dbc9811296d5952df5
    *7fa9ec8c521760501d82b9bbe098dc8b86c281bb6819c202aad4518a9eb9ab3d49f0553b3a75bd
    *daf580713a55768d4cf675aa55d2e9d24ac9862e5530ca1d2a1ba1ea0cacfc1f20a1d2a59cbf0c
    *b5dc9d2e666e779293480f614e2ba429730ead0aadc24e274eb942991ce0700c35a4aea7b4d391
    *d306ea344894a194bbb2dc0027bf873aa74e572aa8e5ae745b86fa63ff4f080a9be53fd621e61a
    *62a066f9cfeac6fa4ac5fe77e5cefef7767eb719fffbf722d3b1a8fa0f22da212664a2e365b9d6
    *c4e4e6183b140d99ced28cac5bc843211fe6726d303289d1b4939292606a3bf9bff72e0be3f938
    *bc4726c5f71c09c9bd9eb8e74857eea1716518e721714903549b05168fc369a3111d0938e055cb
    *4694e1e733e195cbd4cb4a6e4b966553040e6f93488b022f513f44233ee86a5f853ddc415e7f90
    *cf301cfa799acfadb04ddb68b93b6273d03204695f1b5a50d463e000d94f8fd94eae042048c6f2
    *49cbe082e4423dc5b1d3083278aa80906cb2f5a6906381818504bcf6f7d182a90c03c80d5a68a0
    *84c0422b80119ac33a2f3af83c7ed00d50ededa1291682976f495aec2a706531a1246471c2fe02
    *3b3422d4058c83aad1c290fa0cbb8bfa87aad535eaca7a68f84ea31642d18b511cd297303001ae
    *d424b186d72b9d141d7d1eec2e21a95492c72ad48a0cd1f39de5a132da8765ffddd68c58bb14e8
    *6dae2df0da47cad8bb2dade30618396e069b04cbf3d1bc2d978efed08c94569500a8811696d232
    *2217812d7664291c0cda7086369571363d13aa1ed6ed0934211165478a2cfbcfe830a03da703a7
    *d7b52059fc27929cb0ab6de15eb8f7667fefcdae9985b44b115b2dbd1c269fc324220363ed573e
    *c0a5779e8cd1326d519b518b009aabe1cbb6e22c5fa699d4264f5ba9990404efc1a399b58c58ad
    *a20c72db455b3b34f49b4fa5c5601ac7e148796d0ce809b69a637579436eb978cab44bad6a67ba
    *437924b7e382db255ab866791a66d9c34f7ac4cdff5f297436cdc4531215573e03d5884169bb55
    *94c7b4ead244be3d62df49d7a77032322ced958894d3590e01cafe620c6497d18a55ed335e3aa6
    *656a9fdad43e4532e0f21e4ae76aecaee3aca6ef2e4bde350df6923cd565c87d5113cb94aeda39
    *9594fe5a933aefb92e99bffe1a745e257442f8703e95cd9a7a89dd08ff6013997a497d8a2aaf3e
    *5257153883764d7ac79de2ebaee7a683a82e35e62c7bc3fe51f1007bc2950eb9236ed1b52eed21
    *6bdaf99ce1e7ac160120fbac9ba95dd3de9339efa12b19d85535438038da825e17af9f87bf18cc
    *e0c52aa7859f363e26b966d0b26f3662657a2e0d57fd58595784d674e561aa10b16f80ca8b4ec6
    *a1beec0e209790caba1cdb26fd93e4037158194bd5892dc9a2564790878bd1fe4565d3ee68edbd
    *9f932e3558ae49be7435842e2590f2da6815b47831d98e15e783ab6a7d54198466fa9c2c8e82a4
    *daeb00ced92593f137685272219b046db8548bd2acda2038c5580d821c4b2c82259a1a9d8423f6
    *fe90a27f6d746689592481c9465294397683a07c2ccd0015e2fd9759f44cab1176e35ac22defbb
    *6379e1ddbcddd663ae9b697e1cdf74f30d1d03ec4b371fcaf89a5fa266c8e56f3e6df4d2790b5e
    *4b0cd165443a2977c5e2a550efeade4dfd0d5a71ca6ddc902e7f68f976f2d2265ebf8717b87a93
    *73123e819243377223c2ad6136e6324d79c780647314d8cb3549952a374bc2b69ba6b25a2b3c92
    *9d45736d188cb6d51cdae42c32e5308fb94b83449d2d3cc27b56924f2ee686c20c6151c94da283
    *81e86c6e766d9c29d183f01407836287d0725845083db324694141466a9ad3921284aba1ad0aa3
    *077cac68c0b89edbd8ab3ccb3085f97c9887854233e4a02bd2a98a8d344b496a176d2b9e59996f
    *7327f55441b2b82338da5937d8d0b42f907aae2e1dcfb526bbd78acd662418b269f63687b389c6
    *518a4e08471ea64f96195e209d7e66f78426421cb9c5267f6ee4ce6c2cbd9871ec47eab1745ecc
    *e645cb88ad96ef22d26a4fbaa5838ddb5d89b0414fb8d760d05527569b4f19ad2ef0b4b9cd391d
    *9ef26594e58571b88832b0204e8fd33979c66b13e3887cd000e571d535c6d4cd6b0c8393ac63c4
    *fccbb2ebbe8c192f670217dfb45ba7e0bb8d570ccdb7be42f943ff16deffb14baecfe1356c012e
    *afffffe8e1c6ea9dfeff6dfc961ffffd7f3c7e72b54be045faffeb1b6be5fbdf472b77f7bfb7f2
    *73ee7fedebd9df89eb67e78e4ed1e20069f1777b75abae6de59ea9f146516a7c9c66b0a34da5c7
    *4a60346430aef3599c4614fb02f9eb641c24a38b81f809fddb05c06f2af7c14142b527d80b96db
    *641295a882850c7d40de6ed19f2a6caec3b020976e29c9a2dd300ae888728e71f44ccdd27725ba
    *402457cf03d1c62e6fb31fc2916911e1a41ac5a5c62950499ef6e89e19db96859fe651a6180f38
    *47225b82be19f9ba7896cec8fbf4981c41e2762f8fa4740652ae0d8dfc2110a4284f6208e9a217
    *0faf0882fdc86614fd803c25eeffe327f669c89e7a3158d8243c437786a40c1de53026805e9449
    *2e783c273c95775ef60489ce650bf46c98c1bcc0a2738c6b4881b9a0531e0fc42179e03e0b714c
    *d1efa0096f089dc7f10d11d210a048cfd0d0b2fd7f1c1edaa842cbc835a9aa9b1570e9f08ad029
    *4a6106bdc138c18802a4d33e052561555d1a9a2444af92794e7e846f728e36dc9c3bb3d2e7abd6
    *737fbe0fbc7c18f7ff117d16aa4c4fd0acd659c8f92d0e02278ec917ae49de4d9c6476a7eebcec
    *7e32b9ff3a8f46a77caa83132b4c5f54983077cbb30f0cfe8303a69a204196ef9c4b462087ca05
    *310c3d3cbb6104555a079e7a9d2fcf8c9fdd12143c27010014263bd7baf0b903ffd4156375ff9c
    *6ee6af6906c366297caa486874ccd4c75b12735a54aeb0f16c0c50722b98a87dfa4c498b88c286
    *b2b5cb11051345a57ff554f6188b2edaa8cf4df4b9dd4fbdb7998c3f8791e838025d30c1f96f0e
    *384ad15f6bf9d271574d2e5c1693941cb3e2613014d32889a6b09c570c0518b1aaa5804238e96a
    *ec495b5624ad56c2666edc65d83a7af80dcf31f40467a39f65f95fc4bf1ada074da343ef8b8805
    *364a168fc729a01f385c9be44dfc32c0f6c76101eb5a25da9ba5e6cc88d5a839abc44d474b95f4
    *4f29e93cef2ab5d3367d36389ce71e530b2a54e940d929037eeff0d72ebccb4ef2e9be97216969
    *82d1c11fd80aa63a9793414afce9525fb6028ff061f5c01ee0e93434ae48a9cbe91a418f1e4938
    *241454e4fdc00e21f437ec9f5c51cb489c3d3de3deb38dd455cecfa2938b2fcfc46718989ca982
    *1a6b5c057d96a30c67dff01ce09e596094c2f6484564e43db2cfcea6037255ad45fd7a267237f0
    *2287dd204916db18fca2be3b41fbbed0a500320dc88d60febe5a15b086ca0d163af50f666d8e06
    *9ca01bec9e6409d0a57d622628ec8040f70320f94461a3edb97ee6ae66ec54064d42fcdec6b572
    *c0564aab18fb4f7db601d1f22947af6b859ab4fec8baf4186b381fc8a7cacf231ce09fd588ce4c
    *fa98e435ece30bb2c03414855e1c20270ad9c80d15e289be9fe733c830562ea92800167414d29c
    *0db1adbc8ac95858980156039d097703a0881cefd0d0d5027a92c9e7a3114e2774a0e4e02fe9f3
    *e75fae3896741fb7cc50ee7ed223b9fb098740d90afa8612d24a83b9fba98d985ae3885f6c306a
    *147b306cdd5f961e4604d33c909863e9a12411d91263a981368f2666eb748adea4fbb4661815fe
    *e581b4389c197338174f25d3a43b15f247e35695adf14d35123e7bb29ea3719284dbd1dfba689a
    *799e5f02171a722f365e72a94107727910a2af0aa56f7dc2fe7dff9697ff1cecef5ed1066091fc
    *677575b512ff6bf54efe732bbfcbca7f6acd012c2dff8abf88df85cc08e8f74e64749b22a38379
    *a2c26fd802150c49354e31560ada2b38a131a231ba02195138d2d9bcc807b7a6fdef50c9220946
    *4f40ae0efc876a8305fcedaacff3a403ff75ab220baf80828ee8979641e852372a85e8757ef8d2
    *edfd2d0acff63b83013f1dd053e7d90fddde67788de9dfacbb587e50113594451b2c5f28997dc8
    *c3edc2d842ea9a934eba483b526aa8429731cd0d58c28044882770feeb912e780eac98b77ae067
    *0874dcc7477dd8af18d2bbc55938675058d50db0d9eb4b8a4f58c3059adeb72718d48d6d1e68f9
    *039026e9566fd2d36f925a396432b7a78be2876a0f4c90f3522f1d02d3f51de131c57b82c769e4
    *39c0135c4b0e2111ac1144e8549fc1b55126400a5095963cec61923d70c6a8597c9444a8ad3a3e
    *e2609a83b08bb3eac9c673314741e3787d2907f09303932901192e7e274132a698d71807ad0869
    *ccd42147e92e96b85fac1ed8fdc0ce45ec3f27d89f3bc1d380ce2c98d451d4f791c3f37d847986
    *f10a38569f550ff791756aa20fbfb432617e1a06d45cfec1412483dc5ba6b375eecef0e91010fa
    *a2dcc1506eced649be5fb5720e4b4e8c4b3f571b24837d935b3774205cff34543306352710cabd
    *f850f416036847a350a3c3fb65790ae36e8eb714918aa759a8108e782e9fe3f2a2c254c517ac99
    *4f2a2f58c5abf40cf5c47a4eb44a288d5a43963a4b99fc78e787bdb6ead6473983415242d997df
    *1f8c4c1d181700f825b64453f88efa9cb47f500a3a44fd48efc04394266d278683be22c96957e7
    *26da1a8a443cfd41646dd717a84d5d8af611ce1705a733fd3ee976c5335f514356aa684c194d3e
    *b2293fd0987c90f9329de1834ea3acfb3243ece954cb378eb75fa57b1c5e5a5d91ee4086b1c76c
    *d2cf0dc1c870be933842f568c9cbb9d3734e67c9c5a5634fc81fbe543aa97e26ba0056291d0108
    *1780ec16cf4f01904e64d49225435e9007206a64dca59d4c371309a9d44c4338d8585f330d490c
    *b9b1976d662c0c4d51633dcd3cb85c332d7967b37ae04801419ad1ea527a31537b915fbeb304e8
    *2b887c64d4c63b31cb1ff5e795ff64e97c7643be5ff17779fdaff58dd5953bfdafdbf8d58fffe1
    *fc38c8aeeffcf53f16caffd61e56e47f0f57d636eee47fb7f1bb59014ba3540ea96a4054f54791
    *c31d5e40be11e99123da55071bc7d8a6927f8dbcd9c146c51746d96141a7dfed89cef7f8cf7dfc
    *e701fef34ffa07ff4dc263724190cf872491c31bb85134eb3a303d1dfe554569a6a68658d58c09
    *26bb5e61a9b4fc0e8d573e1ea89dda11043756e57aa0727506ff3dd0cfd03ff291bac42b24ab22
    *54edb2b23b12c2af92adcee1847ffc1a87ae8587b1f3583c110ff83183476899fafe584087035c
    *52aac7bac531326d7477c8ff50ea266ab1a0d740aec89b5ba56d8a63d9c32d854e03749d058ae9
    *b16841d3482905ef09b4a3823afc1e207e28b682723868cb97a4dc28bb196361eab2250acb8c80
    *3013430bc7607139f465832a4104e258fcf39f2261e591fd14c696e9438b8c4407bf1e7745d2fd
    *a3f2bff5fbffcdf8fec2df82fd7f7ded7179ff7fb4b67677ff772bbf9bdd1516efff7f04df5b25
    *2ea0c1c1d68f9efd7fb9edffaa3eb36a3728942cc865e9abfb80af8c6475cf379b3ae9df96335b
    *de942ea1a4abcb7c209af9308ef0ca6738279f48beddbebc375b5d54bb9f1f85793130a890f436
    *3f81e18cc33c4703e3228dc38487763f4c12d403df9e1fc33a92e769d2ce5167bd784a97a62745
    *317bfae041205307c3383dce67698164f90048fbc98395c70f62c8de0f92719f9cacf4a3493fea
    *9f655111f657579ef4a36470524c894a8371302b986298efb42f15a0b7a651c12c06de420089a7
    *09eab4b7cc6e455220a295698f373abcc24d4800c47a8d09eb339a22e72be26245457a86a71f04
    *c52e161dc93d4086aee8c8e78b95aec989e1405dc7b0aefc7ec2b08d96a396a34d28587d49464b
    *8aee175cf7b9255a3e87ea2fc4c74ff3b4f828d6ca92dd0b4463154a9d97126c4c8eab1001645f
    *e0d584826b013826f47ead45d003ce4250fc5a8ba255a89ce9d2e83a597eed4aa160d3fc21ead8
    *fd248e7b8a09ec89ed6c1801af975de04b89608e35bd24aeecb0b1926333b69b6609e0367d2f2e
    *a44cd17cb69b617fbff8a3f25bbfb79f8fff3b80b5f206c57f5791ffadadaedfc9ff6ee3573bfe
    *ccc2dd82fc6f7565edf1e38afc0ffedcf1ffb7f073f4ff3cba7cf546a037cb60369d1c901e079c
    *f0bb3d33d4876202267152f4c90a91b0ee4b3e5929f140e3a09ff3701ac947cc7908af491864f4
    *098f02e22815c167bc8d0f9017863382d40542bdb9110fcb003ddd4183c98e50eae56bbf2519b5
    *1b8e1ac02c0614c408950ba1aaa9250f41704ac9884e3be42a02fbbffd95cf14d618fb448807ca
    *d28f0e0a077dcea90e079236f805bb9b3fa0044e4b070fb0eff5f7c17df5fd793435a525f43769
    *360546dbad843fa28b5fa9a74299ff16928ed4e12c18e99cfc8d3ed950b7e3e37098052a977cad
    *9752529b3d62cbf709daede0685e5ebbaed56a11b1880e424772ca7adaaaaccb3a1fd4eb188d53
    *e2440a355bc8a1dd470eedfe807ce5e31bf09df8d6155b0aaa294dc0cc5858006974efb30430d3
    *b65553cbcbea16fa4a19dc47def63ef1d4f4a610a8abcc1ae1726d30dc581b55c4553acda2360c
    *b82a7ae5eaedbadc96f4ca9511028a94a876ddd12fa3301ea39753997b820243c86d51097e3386
    *96593f61fa93d0a622870999c300e74fe592d201667f0b091112316aee96fcbea6bf021f8da165
    *7eeb7fc8faffc2eaec4fd3febf54897559025afc3d72f63f6c0a09e17b7e4854ce0db195c10028
    *f8fcd0c964ef2135a2ad5b44864059dff4972aff50e3769f948154b5d0d159b5bcd5bf6a0caca1
    *85f6c839ea0e34c1d403ad9d02d144e3e516755c605d45db1a5862bbb4fcd2faba452d5134b629
    *5ba62990c89d3e5d74c90bce96ca3ae0e65c08a2506ecd264e0d7e042ad64494898f8a463e2211
    *b9a26849450a5d2622ad3ed4b1a94f3f27ee9ced4c7b49776119eb39ad96efa59783603dcf7cd0
    *7ab3abc3b39e3ff961f73ed971962ad3d4794faa6b1275981dc98a677f2f3124809ebff1afd3b1
    *cdf594de537fbdd0d1be9af173a56ef937bd3a0ea5f7591d4e305c7eac30a1162ff9777673f895
    *de3fd5e30b24508731262dc459fe7509a9b4be9717fcc4b3e3946989dfe5f22017ba9e48785db8
    *4455e50f694ddd2e3da92ffefa7b22bd3e1ee50f33518b994b55e65b33763d0079f358963f7c6a
    *42db252efbeb72a8f7003c37c16a83cd28f46cb62129f311e505bdbea4f396fae0b80bfbb2909c
    *b7991faebbc45f0db2f3f6a9ae1e5aeed14f4c28ced06c090f33c33ccd8628de5fe9c9330b3af1
    *0b451286785acaada3141d7802f497284f4e21f1cec58585feab20270e9b1df0f5c83036238dc9
    *4c520e1ecede00c403b2bdf22c4c56794c2f2d4e5381eab1921b13fcc796f796e4e4645c019c43
    *0187cffc631758d76be25a22f45a6499b0af80ac4415a15d1bd905787e6bf1c91ffe572bff4381
    *7e18243721005c70fffff05135fefbeafaa33bf9df6dfcae24ff6b8ae97edbc6be243892c4fa47
    *940e6e0b89bc94b3c9636a7201db1ff9e5e5a118a0bf08743216c7c615715bde8db5d95d1a9c9d
    *699383bfe76946a7dabfa773919fa4f3788cf63ff45f1bd6ddb61d1e807a1097de01ba5f81ffc2
    *ec9e80ed917dbcd3757328ebfbeebbf683f6972fedfe30406b22acc1bedeebc74151a091531bc1
    *5173941ac3769ca7b8ef4a81e4d6b1d6438bc65bec7d58f50396fbcfaf2e6b5424d3206bec2994
    *3af22fd9fbca677f907a028003d72cc9b325da95ef34146f0232b05e223a7d495fc1e8210ebe1b
    *a07589320655dd8b4634eaf937ab41283709c4bf1a1c6df5f47d706f27d5cfcaddd016d0dc96d9
    *ee897a1d2b328d80d78a4ca5aec808a6065d7303acbe0dadfc9d4e20065f06181d061a4c6672ec
    *d31add37e19761576308a4d643bb61406feb5c7c04843f92db69646abca84bcd1a2fe6868255f2
    *0068992d511571c97a81ebf4f78c2bfff1d79326761d1dab8152ddc2ea29c97879fb49f586448a
    *7c08ca345a353aece227bf98c26a97452398d9930920214dc8d59d41971d0d6644d2d52629b1b2
    *d5165f36e4971d6e6f41fe2a7bb8a0805a8016032ee5e1de890a69da94eb4e620f945e18c6a2cf
    *3b82d2a2cf250ae9d29fe70675a95c8374f082849700d86d1105b5b24763983129c641f1cf3582
    *21578f6546a1be84d582153cb77c70d5793ea89b8069ed802d05fb031e334aaa4274f4f850075b
    *9f0b7dcdb47b97d4a4fc9d1bb19eef553a57a9082fdfb99e1237d6b9cdb0afd1b9be66da9dabfa
    *cced5b804381086b7bcfc673f91eac2965fbc7a32ba54d414be0a24e5b061cde193580d3fd7489
    *06c93b8be6dae90e834cd36f83ffaf3dff6120ec37f3e92d9cffd61eaf97fd7fdf9dff6eebb7e8
    *fcb774b4e7dfd9895092ef1ff344789621c72b2599b1d23c4717d028bf1cc54184dea0e088683b
    *5c6c4373a583eeb63e7a899f4e52719aa467794fc1c8d8c50a3a7a620f25a8b83a8473191c2d95
    *f3dc229b1727ff791b2a1f729c1a753e800a395747fea573987c6e3887d52950341fa0cc8949e1
    *862726f5fc9b55b5f7c444a725c4b1eeb0a4c74c823607245d9ff780842776b527af287738782e
    *c24b88efbd80e5f1c50f174dc5b0a8b4b833c719cbf2ce876ce9cce205ce67161be35576ee83bb
    *29567a9f7909f26a8e9b5f9ecfa7213b4c078e6c5e604a3b236f294398221782dc99a12c0229d8
    *6531346afaec6170f2e4aa1e3d1ab37b4e1e8df9cdc16301d852969aee56670bcd8d79fb5b9e30
    *ac0e5f362c4eb3fe67906d93efb9b0884657e70416c97f5757d7cbfe1f571fddd97fdfcacfd9ff
    *0f82e4f40deeea7ebf8e353bffe1289d8563fcf4b7208b7043838fe40805a9e94538c223ec4b19
    *622b885f84b86885c928aa7893fc667aa5369d7b58860abbd0136fe3f058fc258295e822fd4cdb
    *f2cec93c39ee8f4ea2f0441c62d008c8b881c02abf4b321b4eed3f94598f6737c27bf4444ea348
    *bc01bcf1a633e6b1a3cd305583f4b5adcb6a46a5913f80ec1d8a963cee4a95a1209346e673a56f
    *896679ca86e5b595b21ceb70104e64d868c31f7402f42237fe28c8dfda6be60de083e20b087c85
    *39e8b66c7db62013c8b17d817ffbcfe0c1daa0194704c66950319c1f89c59681797579cb3a27a0
    *6b53f2e566e16715c53082f2b94d46d513720d6f2ab692175523912ed5550242875fe81ecc32c5
    *2caa65e88a8e9c34cae1c06d2dc7765ada1edced70a6c0348e5119988b6140abe316ee7afbf003
    *591b11288a72699a8dbd0b68788803934c734da7021b8d4e58f3813380907c66a801f29d79616e
    *fac8d03f0cde8c159ccecc082c8d582df40ec5643feb8a4e4434dc15a780b1f1a61846930b5d7d
    *243affcd050a826b0ce47812744e0998acdb1a25e9f5aaa413584361345cd63c33fdf31a1af73d
    *fc3bb4291af37e8f426e95a3efcbd1b773dcf7e5b8af7248aeb8f31af17173c924c9bbd9cc6ee4
    *667492a45bb3e838a120b16196c1b1ecde3023cff2f00d960b74804b0b4c919e85d93d2a804221
    *21962cb064dfaa7387b77bf5b9a3f9acd15c41e9ace0ad88cf0a9ef3c17275c8338e17b4f74c53
    *39f858ce2d8c6f8be52ad7270e6bf55bae64f5147269109e93c9a56198d3ca15aa2f15fbd6acec
    *ddef0abf05f67f3762068ae7a1cbd97f6e6c6cdcf97fbb95dfa2f1df9e171c4af985bc0d2e22b2
    *0ebb8c3460c1f9ffd1caca4377fcd7561f3fbc93ffdfcaef8afa5f8ea4a0e668ff1e1e471139d1
    *fe1d0587b0546f0675c4fdbbbd3530a776b547e7a4d365df1fdc6447d69968d6f65c9d1c5f293b
    *f151fc85fc3b967fe368e20f6920fdb72ca53bb59c70bf145c000a0563790a7d016c0e1997c113
    *fe3527773bd420e24ae762d7988b5822322d946038e339413b67b5e996f2b99d63a8410f909e66
    *28199e02e5964388a48d0d9cb3eb5f3ac342e8da5716b47961c4e2032a72bf1017741e3ec7173b
    *3e20e96323047ca807f19163a702be0a92fc80ae3d6cc6d9d341eac4e101aecf1b2fd4a3a5b280
    *35db21f3b0e6ffbfbd27ed6edb48723ff357b43df30220a628c989e3d9bc282b47b6339ef84aec
    *ecee7b9e8c0482a0883508d00061538edffcf6adaabe0f8094ad3873989e51804677f555dd5d55
    *5d4745792d472717099a63e8f72ad9d61e874109b48bb32777e9bf4af95db447a85bd9ad118917
    *89302dadd8d90a38df33266c4acd2671e6a5410b241b0f849b1e93c309b44df23731b527e14d50
    *9e7912fd2c6ec9e4302207e40d224f9443c8df2aab9ce294dcb2c60751de48a9825753c4d7df25
    *0945eae2d826021e1e6bb888641537f878e2878b2831737eeee4fc5c8e3ca6dde0392eac127b4e
    *893d097b4fc136c77513898135c6553e8aec64c96ae5c514cc28f87c6c8ecc2c9228ffa9c82eb3
    *2582db3625067c0bb1840894cf08af81034d07301f5be33d34c4dc31a2dd5e9e862ddedb44fb9b
    *fd8d166afc940a584643749add12d3aa3cb0dc14bb2c71d9b116b4ed3f2c8ba0650fd71c801430
    *2509800a70cf01588a3f0e7748b3cfc17684cad96bdb29dcbb5b8d596684276dec57014adc1466
    *c1ad826e08333e83fc39510f9421c38dbda26d61230ec158a52162a8177b334107fd6712f246bd
    *f36d40be981dd34ea51ad3c394307e56efa14ea4eaeb11d10c8f6e42a53a513df175b6688aea25
    *c2e153ae4bc4e2135981f3477bec8d0b7b6ca4f9ca9b69a6841a9ad5a9f95d34c04c6d30c28499
    *b0042a640792c090f24a7a45d31c24878d9b31f466462172e28b316c6942b14ced7a73661114bb
    *5e157ffafd0bfe7af97fdcdaaec809d87bc87f0e3ff9ffff38bfe1f97fded42bbc5df8302dd06d
    *f29f9b5fb9f67f5fddfce2f093fce763fc7e1bfbbfab9542e01f12e80c8974c86a4ae22bcfbba3
    *08675888b3931867ab2067d0c9f04710dbd8a3e3cb681ce10917cb04952dc8999584440430f928
    *1345046171215e65be583e8ccff3b57c0e6b6ef6857ddc2eead9eefc6a7753bb9d2df6447d2832
    *918677720c80a4fc43319fe573f6e8f4c79f1f9cfc70f2e77b273ff409a6fe9057b362ae644417
    *480baa614e75f2914e1511c48555c6f3856977c98ee30898f8681cdd8892636e9b711ca5110672
    *e58ea7c94d7524e146c713aeab44f1638fd3630a4397129fae08631e67d3f01fc763d8e5ed2ac7
    *b8177533e3e1e7f28a5ba3c2ff38502071ab76cead1f603a31f4ec5af6427abe9bb007143f96eb
    *82ce38ec031e090fa32aa6ed9ae5dcf28d03ade72c95e6a58c7d239c2d2fe0b44a9b6c51bccedb
    *bdba837e03993b9937fbb33a6bf70f0ef60f0ff7bfb8bd7ffb3ff79fdebdaf0fb8d56cfeadd6ec
    *d1036f8e37e9f7a8370c25905ea0433d530558acad7bafc40a40d1a1f44097a7b32046f0cf772c
    *eec5e23a2472d07a712476a992d8e9469bac888b2dcc10e0f9df8ed8bd1fb7163b65eeef887dff
    *5cd81bb9bfe1da1e3eb76b8bff02e73185e7f48bf16f530a076a7c9f8606440a1ac363a2648dd6
    *76a5551c60e184801a767e61b8420d577d9c306cf210a858a050b223c8615845f5b429305af4c5
    *ee10b9c1aa5134100e56e5f5a3e29a751840453458b219f302e406c0f168784343d7ab801eee25
    *17db72b07f0ce8ce7bc828e5b612831de40860a82810c24f5eafa98b0460bd026a1d38f5199208
    *9a6453ed4d89d08c6e0fe5f725663b160cc8c7762ca985626681a112d22acf9ccacb74705b7921
    *00095b08f6747d57984133411fa63617ecede40e23a40c5e2f3f38a1a2f6b8cccb62c5dca8c8bb
    *8ed310783e449781ec5bf89a1dfebd79a67fa5df30ff2f86ff378dff03acfe81ebfffbab835bb7
    *3ef1ff1fe367f1ff618d0dcb44e31216a10169027ebf9f2e0bb269fc3d143f2c86ef1f55cbc3b6
    *cf2086642e066d6ca97a883d959b87622915fe45ba376071247a1b2564a5021f446224813c377c
    *4d20a4a563d28f86a6c06ba1e5a8d82d261f475e21e7c9175718a61f6626e03d6bfb1d093f3365
    *5b80a062368ed16b8ef8fc98ab57e3fd683abb9b676374a6f40628c9c41557dc59299234ac63d2
    *275db88cf36eedf29bf2fe0f30dc2161845fa1f81068a455cea2ac83621538b7cf6b52380f0654
    *24bb4c3ffd216c04c8643fa350f34feb96a40743397f7e7eff4f93bb1472da89d028a3584fee37
    *796e48584e9e3c7e7ee7c1e37b3f3dc361a260f724ae7896bfea010063bc6af2b685be4e7e7a78
    *cfca05a5ba5cdc00bf4a947046d4f6bfa74f606194753acb67cfd65cfe15e80c9a6af2cf0a80c2
    *4f65c9c1630d4a1cd5df1d6b4e0391b1a8ba67275d0a914e3eafcd8c3ed1457c11717cb24625f3
    *d085e4d3af463eb3bd21cb2620e14c0a16651d0a8ea97a90ce5a587319dd864266261696511425
    *2681a2b8f0eca262293a3ca25f52a62037269fa746374d364de7ddb3f29a0ca43020614e81cffb
    *802b5b12e5d883fa232d4064ce894cb2a687786d4b1be41dfc1fc37071a65198834820f0e1ba32
    *c4d13fdb4ba7ccbc31755dd0498c88f425524e7bc01b2a675570c0db2e832d53a6932b6d351c15
    *8cf5211f0e587c339ded2019e88d9dd585b82721ae6b6a5105fdad44a8b23e882aab01498d33af
    *448dfd3d3e51e667fa96433aaef19e96a11eda99ce5459659ea390d42ca79f5789b6a5828eaca0
    *d1552f5884f3bc860c90ef60343cdf7e492a67b7ab0eb76ad9df33aa7ee9f56e00927aae07a0ca
    *8e2d596d6f2c6500e5d6b552493a325fecad4e4151b31c822497da91bb0ef55a1781d67a16bcf8
    *ea6d29674dbeec2f441ffd32b3e2757f19fae897212bcbbe32f4d12f836dfec96d9f9aa85763f9
    *245defb2bfc7afc68d10c6aac2d340f31fb9add915aa2c6b4a788560d79fb71dedd51ce9a10f67
    *bb399a3c7bd5bd91fce0c9dabc1cbe50cdcba2a4673ed686a43972dc4ea513b13871aaeb2f21dc
    *809925bccc3cce8c728b263980c146dd0186c1f0a4b5ab7fb3506b1d50c3eecc586f3f10ccf040
    *de29cb2b6bb30d6a57176c3e942d537fbf68b824fa8ada1d04f89eadd7b0b674e2617ab57d08c0
    *7bdf2e0850c31d2077b9b85cafa8032178ef8bf51216ad612208d4f21decd38bf4974b498643fd
    *30606c13fffa25fdfd7ed927cd26d3f7e5e524d926cc20123940b77740c3eb0115bac80a7407d8
    *4dc3b5cf8eddb15d15b90db0016eeb8ae1932a0466e76e3c6d20255b87bb42d1d7766cbe074826
    *d00250f42580961fe225fb9b15aca7b74f1af6f07a0006b79ad5979d9660771c40975c1ab2f8f6
    *f5a18bdced38cd7da50bc401fa210b4480a23dea99e5d76b6bd730fb9577cd01fa215d13a0a86b
    *28ad624af6144437e3f0c4cc57816e0ea0cba29b284e1db0447fb28048bc403f213d3bc1f784b3
    *2f2fdb1d1b72b0733ee46dfdb381f6c3dbfdfc61f189cab1bc725c0cc3fe1094b4218eb867fe75
    *de5442e42b611892623424e8e9fbf3267d9d372d3ccf2fd7730f7ccf55b20f7e5be73dc883408d
    *89368661a0c7908bb45a2ed75b1774b0b72ee8ad3d75a1f602c46936ec6fcc724ef0cf709f57a8
    *c9b31b6eef5a5178049c8a7a4660d73a7ac1d38030714b62ac9a743634f3190f8a7be9252ea186
    *bbec42dd61714b80fdb0464efea7e87aaabf6b940709bc4b63b6033dd8c520f49dbaa9010fc3b4
    *f1db28ba0b763fc2217b0feceea96668182e8bdcfd3de905ce515bdca2b12d54ad7d1da791b097
    *89ad30eda42ebb65d59239a87c7644e78c42f7ea220f8b2a6f59495682fcd92f50262cd39c3234
    *0a3ac44be8670d711dbadb5ac3b7d1168aa8afcf623e387f8251a37b89221f8251e7c9226da43e
    *663fcd80b79b9725163cc8c1ee3990b712442ed03e78fd12d45ecefc617d7e698228003a2ce5b1
    *606fdd4c02607b20f65e28fff4f01ebf4a36dc2db8ecaf8626725f763b9530837df6616eebb704
    *d70f69978b6d625ed445f6eedc992e74e5747110f48790c516403528a81bf3e4ee13a12663a973
    *4c3e27bd9db469f3ec390d1194cd9be7a893006fb0b38de575393acb819d82f85b5bff01d10ada
    *8901c0654ba82ba4b7d0d6cb5c08ed74b8cac775f558aaf8a4645b813a20ed98efaae872a7c578
    *e2337c2ad19f2466a1c089fb2a7c221c25e96a0c08004dccd7d984ab306d20b9c038cce9462a82
    *538a52283742a340018c5a415a2cc4b5bffaa492f9cffa1bd6fffcae58039e7c680c9061fd4ff4
    *f5e6ea7fdefaeacbdb9ff43f3fc6efcae27f90fd678ef883c9a8ba3866dfa5d5f9d3748d2c1ae4
    *104fdf77296d59ff18baa01cc37755059db08043efef2816226cd032f81f00a4e277f3aa68d977
    *5d5ed558fa4f7bfddaa45ffc6eeec2e4114411e5508ff4bad18debda5c705db3455acd00584e4e
    *6749c3a21587afd492417818cfa1c9e138ab985247e5b1d3c6aced56a42597cfe74556608da8a8
    *8a87289d70a8a0da55e268a450cd6559bf3162fae1014da12e73d6c220d34129cc0fb1813ca65d
    *57cd5a910be118cd9d3038a053344122db46197a495a207275d7b3c96793b3fdb3c9bbc919e4e7
    *c12f53041489fc9188af32a6b13cd6c971c4472d02caea7872e5ded8fa15650512233a7d9059af
    *01676cbed0c7476955acba923bc8e3593467486115cfcb7cadbecdbb522ae1f229e5cfe67c8b24
    *3dbd2a4f9b37f265960354e9382efeeb5f1343b3f761d1ae8dd7bbf05a54d9fa4e9ba92fd4f43b
    *80f86ddd482365e068a76a342addceb6782b2b2ada13d5aa5cbaa953aa413ba91213e4312ed1ba
    *ca911e54c531144f392bf97fe4dba1783d6489a54bea0513bd0fb96851ab8ad63576d729877f3e
    *c4e079c0c6dab8c618b6907e0ebbc784cc5ecd043289e536cbb853f2c002b499d4ab75b1449f02
    *3c8e3b6ec6a588e20769b0e2d1c6986130774806ac12825cfac06d935956d6b028a732f61f8678
    *e7b3d8b265d122920a3be767d07ed80e79bc3a56162f73b26c56fe7856e812ab250e1ff821da79
    *b8551f6c275332736ed2eca50c98c4cd93699b9b09fc32372adacb2a5eb1542f43b46f0a3a3a78
    *465eac853386dc118a8384c2b53ed31a81bfb2d30cb6b8f59df543aa131573f110fff9f1d33b27
    *3fe041caae41152237d4f83776871466f3e635df8c3b8a2d45fb24231bee5c8e1123c8938002e9
    *2e3fdebbb9daf5c7ec0d8c299c0e99b194827bb698ca5c553c569d7c54b774205fb693257a42ff
    *e7e8a4820d9d747f4e271fa66f2fec7e084d776e720f2d99c219c6d66f6a8ccb9c9e033b3a614f
    *e2c3044ec1d74553575450ed73bc157287d2add832d40fe14c7e03c768c39669f37202fbf52cdf
    *482cb60cf519e7180b38c73158995c0f13730c166f964687b7d7fe67d816faab3fa703fe522d58
    *a6f0bd6dd3c116d092152d90ab1aaa9c626c47e4206883a0a0da846a62483f08cb0a13cbc8a982
    *896ad0b930ae85f04ca6a91ebabf18251668d7c27b5854af31944fb5fe9a500b037eea61fa861d
    *8c552da83fa874a49745f51daeb8b14e4937949298ad515ffb5a83334e612d786b7087de83d54d
    *b4f10c4952e1e0904df345fabaa86137ce2b0a3cc4e4e9a8ea33c3b349ce440632ad9714e75746
    *76c1d1438b10d8447025b5b21ac352959a9d8ee9c413b6aaf418cbddda72cf49073b9bb3b7ac40
    *d5afb78a686167f333796c174ba1777c82560d8da9762fd3b8cafa79572140c8606411893cc74c
    *705f4fe65c72fff2319c712b4cf142bd0bce5e90f9aaf4092cde43721d779e89473156b8061a54
    *a96e61d5adb90946d3918b1618f406590bbe21298429c89dc7aa38cfeb6a0124f26c329a525415
    *3e88387662a2b7fc471ac91848faad3a1e11e6b5945d9bb28c5d2bd9b505bbb6641d343845ffb6
    *53ec181da029fd2bd982e167aefedfb33a6ded792a8bd09db2b8493c78fcf0c1e37b6caa185828
    *bbff249e25fb8231da9fed934f93695b97dd3a075c7c2d1c258bbda8eed6ab8eb612b52a548c62
    *d86346024960d4143d009d471d39f12586f69dd23fd9beb9b87a79076fdc0882fb6278d1959309
    *2c481693394599b0aefc85ddb82110310200b1c8090b99c564c6b1805c8bc9a45bfc928cfcb191
    *250fd88b5fe8b3467efcfd3deeca71b740b96ca71265996b30006c648f7bc5be854e005c271d77
    *f4ef30622537f72849880cb9bf56d0e2ea069c726e39dd56f93bf24a18f32886d49acb43984bb4
    *90e4eae57874b0a779b3c47d5f7c453a9f283c3c5727239ed1427385ab2ad8fd331832fd4f87ff
    *f1718b17f19a7422d71fd470cce11f4b1a98b362f2041c6eef48f16d769353738d3123d78637ff
    *90fe4125f0d76dbec07d1902929236669f3434af5fe912f804620132a0fc26ec0177ffa3386b1a
    *8eff42cf3b18b3740e7b148f935ab10cdd28514cea3930e52d859e821de0003871eab1b384906b
    *e71f62b5c24fe53fb582524048696a753f2dc5a9fa0ecd188ef807f459d2e581b591f12c66bfa9
    *baad5d267bdc4eb2108a7d111b06501c9c8069451c30b353680e47e9769f30e2155f8866cf707b
    *04ea877d7b449b446a7d30164cb78025d795f027d51bcbb7a2fb224fe60d80573863360a402bbd
    *4df38e9e6871dee384f278e3365765487530e93885699e8b6956a734911e28ed49ac5548f98e0c
    *8a5da095d5c0b99a2bab855dd5a6736e5f4da7e1325f2fead9d706305c80500db9af221f5a25da
    *3822ba020567710918dc97a8e51a688bc908184e0dc4c556b512ad5cb17738cd13be3e6323d734
    *b15e53fb354ba8b099b44c1092391a56addeb4fd8683b26af36e569ff40e4c9026607e3177a44e
    *71a4badf64acbcbaedf1629fb30ac6ec518a12078defc43b00818207102074b1ce97ed64a40846
    *6b7346e57a930452b98eb80c4948d042582d735ea64d33215763699be1d5282c49ab99a380f06d
    *b0c12c58e2c52f48d6924831f439cebece28d062e0236c172d1c4407f0ff0019529a0751a69283
    *7042cdee2548d5040c82847e01adc309538e7064772997ac7bf60fc28ab30846214a10e229023c
    *b249283855d922b2fa1be1c96165ea1940491241f91816aba0b71611115c898b45eef4789bc203
    *8e832e39421b387224e863907c019ae7fb04c5a8c48009778214d91ccfcd8848167eae8f047e0f
    *502ce6ec88dc1bd61cfb1be6292a4dc9538d58db1cfe8328d378e99c386d3c1a804e3a8344324f
    *d2bd43994196e3f055398c1d90e2b8c753fa9be1df1c77997651ccd70f7112f0fccc1336793761
    *f0b15380b041c3804ab6326673a50b6b927ac5ccce5a27782fd04508a8a13d863f87fe93c92b5c
    *e58853d6c624e6c8c3a2bb24fed758841b8e96b35c126df85dc2ae682372f7a24d186b2e339d9f
    *4dcc23d2985907e3fa673683b3b2f1e6d6c1cc268c8ffe1969a0b0896516ba3661e46bc268452d
    *dfa396d3df6c4fa24fb8e50ef635ef8357265a8939f4393a1411e2258310ba2f8a156e93faec1b
    *0972730bae201321726e3c56dc6424f4281e09b6dc1b47fcf0ad305f76d86ccdfe520f931d86c5
    *1804d1406f6d01898dee5151ec05fc933cd79a9c6460407df32b53d8e833bcb1d7b7b992251969
    *5b799f0fa17b329d614362082141c43011b818ceb4ec7963f3e1b298dbe6c9882e13c3ec75df4a
    *66a2d026b08e810abce0c9119b46785ac2960167de32625d04f327660312ad55c0015e404fdef7
    *4737d36dd7a0c47c8e3279bc3a04ca985f5cc871092d68a8fee2bdab35aa9f93a09e48447d43fb
    *0e47c1da3ddebf8bdbebb276245cbf80203022dd87d745ec1b5535b699977a5a16e79c6f043605
    *6f0a155eab7b9177880dd65e291b16fdde0d1327c33212a23d9b1db4b42962eb1b8670b1122e92
    *44360c7d2500db06fb8009606bfb6eb6eeddfd3bd9302607ce6edfac98cfbd6600867551323470
    *7cb591744b977cbfe699addba579306c80b2fdadbbdae62d70978974f3e8f86437001df1044537
    *451145e2b9011b159da3b8514543eb059a07ecdbffd1cdf58a144f019f9ab43acfdba0c846d679
    *b64c37674ebdd82194f043955879bc10b916f06a3603adcd518d18d16aa66a6d43871616c3730f
    *295b491f01fb5146fa98c39f5a7e91e0d88998507f50864a0f9861ee084a512c88a8dde6398a06
    *c51d9a3ae5a432902584d074e5c8d604193878901470321fb1f89b03a0f3f4c96791bc7666ef78
    *1e59abf992279e55561f7ca726016b1e7ca783e7de91ada7b5cbb9679f5c4786ae903e62ec5479
    *186054429112a9a4cd4efb1f5f89db373e7bb33a62b4f037feced445ce4d0a65bcf06be8ec057c
    *24452fee12a3e575806b0a43ec9d85d615a030ad2cfcac565648aac1974eba81f929236745d15a
    *225623e24b89980d911aa9e448de84fe1c94e011858c1dede87a7b26627de25d1f11cb2fabfa4d
    *a5af8281e782bd06fa022fd2313f7a6cab2b1e2ea0fd5a24a242c23197211fe3fb4d68f731344b
    *257c810929dbc7c9a7842f292132526e61ca14137891afe83dd209b73101368463ba80c38bddd7
    *45ddb5e505ecc5e22639ab57e4daf2387085cdfc3b6c043b220cd86931f6882639ae8915e9300b
    *9c83b097237d807eb8182657c4422ed14d18db62baf2239f75804db01da5de4ebee04826eae8db
    *a2150259e24f4460b95d9b8c17f6d2dbd27eca97a89f8201ccd4bd86d887b57206e20b2956c078
    *294e7f8efe64461a032fbb1f1a25cddd90df8e702990bd1dd29748f3703eb1eaf1cf177c9d06a8
    *47b9cbf994bcf9c925bc47c11d2f4c438577249fe0f1997ebb203ba33d9402794a100e49a7f3d8
    *8d10c3e4d213626f1583c31c19e1bcd8b0484f4e344215cfcb4e2e953932f6271313e92361a269
    *181554d8e09821597885191827d7fc1269d450abe49df4deb8c4ecf2d9de8a69c78d089eb913cb
    *6403963de47ae82fb0ecc6c8e85f70f38ccbb47d696ef9bcf6ae742be7890aa0b3f4f1278e99a2
    *b28f19da19b0922326048170aac9cb3e74f1885e19addc1d89e18103eaec641470b5a8f83d0ae8
    *d9383778e22d387972e7b6a80ab97713a5d076e5da394445a227958fcbf1227125f2e865664192
    *cb1b46dfacdb8558b5e22c6def34e75c1be74cd4a3077a611792ad1c2eb434079bdc5ecad37bcd
    *55fee722123b49745e937fd8fc55c775db9fc16197cf10f47fa36a172a4b8d8cda70c9d1aa9af3
    *ffa4d647e172d55c56e667779f1fc9f3c576728bb7d3f2cbb54a124795e1cd3473f625cc699e36
    *5512d242113923e2030294120e366a1956c6b48b12d70a762db3f0f11d2b84d4d54d0f56191724
    *9105c6420ae92a0040da7ad98d4338e5207b96d8322c76422455ce551b70865ea7a5b81a89d70d
    *4c225a334f58599fa36d09904713d4204a9cd84d0778577a30c29ef9e38ca9ee18f35188f7aa44
    *257fcb90b86ed16663c5e29b9faf9210cd7a10185414b7ae9a7a9a1b4b015d05565993738314a0
    *b438ed083df85b0cffc3a182530558a11295c3f24d96e72857d430091eef8cec88fded5ae14c0a
    *aa4340bb8b04ba82ebd3fdee9e461c0c951899eda619a371c03959a1108ebb55c7d74571be4081
    *31522450a12a47f9ade6baada61ca496e6b4abc48dd8909f97a17e2d11b778bf0850c9965bba47
    *d97839bbc6c0ce8e3fdc52703b8b179c4be01e456f8e0cd701e48f990e627a0aedbdda37f3cc3a
    *433575659e6dc67ac7824f811d8736cf1017813afd23250a63dceb1eb9721dfd24abea0e0f7dc2
    *676201f00b74465b4c24dfda96d0ada7df1ca143b64942c719b9c516c153f0317890a166847074
    *8d11aeaa16da6149276edcb8c1aaba595a7e4bf197d9c28715b5e9008acf6a7fea1fcc683cdd11
    *becebe014cc8374fbd021bfcd2aef3956aa197c59b2ea015e7e4d6375c4ef4c26e6a5f4b03e3df
    *dfd8d064059b823b7355a3f708d44d318d512a61b6c6ceb9bd0b8ce9f442aab8a10c091abd469d
    *40b4519be6598ae66086091a6669bb2919b5984eb37a881b4e0a841042110a538f3e3de521e42d
    *f7e4f63d23f0f85be8bb5de897a9e560bbd0e4940dda826cd2562994d15c67d2a3fb801b311c55
    *47705e5463d6d650485cea92880ea603481ac37cc5eec8fbd061f87b2f5a0c7fae5370e7f04969
    *b3dbe782ae4392b3933963ca2f024819909416c76cdaad1109d9b2cb16443338f8ec1ec7468836
    *690d2610c7c01ad415e70a41b049f16d497d78447abe47c6b397a521c5f523e3d9cb521a59ca70
    *96e650d5438f3e0c9da1f432e0cf71376f85f70bf20152c9d6e402a433687ef914026904f70b41
    *1551f36c2b470c6fcf843b0bc3681169651299528ab1f0d5821f8b8a935040bb50f5dc2bb5b2a9
    *948ea92d6bcaad15a9d871aa86ad45fcf071bb970d4490dbbdb00e22a7cb045d5187d1c376ef11
    *a856670ef9ae094d81728834ecd4d7c0a890eb921064e5df77d83fb1291171c3a3ed3eb077caf3
    *7cdaa4a1a2db315584b0d39db8242a0d01180ed2378062bb000d47e90b03d5a1fadeab9f7280c3
    *a5ed1d4d59d2861183f4e4ee0129657e969adab0a9f13d8bf64ff34d6da1465b39156fd01c569b
    *1ff7911ef18d44ed9af4bee708da289106d7b3ec36899225a99839b2174e1a64f4ef00589037e4
    *e5529bd8b8d4ade6bb0d3e087578e3ede77e32dee18c4f749c96291edef2d66e1aba6c9a1a67b4
    *2374e787830cf0222cb584c5954856a4cff5dd67094dc17ba669f2d9243807f1e4ddc49ec1949d
    *6deae68c076248e9e275eaa9a2e187cff003e7914d91ad26ee5b535578d81503aae7efa6a2c7cf
    *4fd5105ff54e50bc57a2b61d44b3df00a10cb199a346cfbf727ce1772b213df58a196668718c0c
    *7b9388cb77b4ea88817d7792b4c907ef64e2f67237725913bcdd6e64322f207ac6bbe4ad004a35
    *16006d06f51a855e6e5e91ec649edab4186d784a522b24a42d6178abee2a74ee584cbbe0699422
    *a22aa1b7b7a1626a22adb2b4b67a0b491921cf2ef4f2741e4897fd7b86f631cd6e430e5cdeae33
    *59b4cf60ffc967445b90e1d2c8348341e399debdc7d790358b7ee4957ac5abf4f776c3f4bbfd86
    *fd7f3d69661feafceb3fb6f9ff3ab87dfbf64dd7ffd7cd834ff15f3fcaefcafc7f7152b6443bc6
    *c73ca2e05d69778f07dd153940dacda917a0edae1ebdc668490b6cd0bdb22c6a9ef6a701175d57
    *e3a68b3c4ba283ac14edc005f187e410343ce24631405a491638e216e1116c5f825482dd2eba32
    *df527d4ea570108984ec8bbc4ae16562fa3b3ecfd7f420bd3349b791f123a94fa3bc4a3eb25c42
    *282f4a3ab6e90e2155efe34567dd4c9ea25e63de1f5cd5f464f4241c2c553a38d28e5f7ffcf9c1
    *c90f277fbe77f283765bd4ae273f7645f692b4094d07a1efd06655cf5487473f4c1ee27f04a77c
    *5794ebbda25204bd9ced890abb49c3465e7ef81305dde48f74256bf8af10d371ef959e00f1443e
    *96f8237957e28fa2d260cf788e3bd2dd91783fa9758ae8244d528f6880e2b627a6404ef4c692c7
    *29e11b20b02da193a7f676f08e882c508d1489014c4362268f7c87ef0ed7a2e46312fcf6029e84
    *6bd7a2be606dd7925a32b67333b56833307042b2495f4cc1325f62022b0db1327711a12149c48d
    *e7b60c49ac4d0f00f7a2e55708bb754f09e1f0851da9a5115a7a6f1645b660e90c38ce482296dc
    *2f051644a41881f7367b70aab5a4d4888b70c23d6e295fb7b81ae5c605d518e9ef98dcbeecf0b7
    *b800c7b8f4cc1150ea2a1a408fc28aacccd55991951940695a7156f1210859b59ce155caa91252
    *284f05aad02966d0d9b58b03a3c7df1ce937645a2865ea43918dd6d5e8a49d32980de5edb0fbc2
    *3562752e7bd88c749ed128696534bac6335abd532fb1fc4c9c5be741d74de7be4d8c049ee3b5d9
    *d0d7235288b67a839cba97c9aa087358dde8dcf6638e81f6e3676affa907d66cff23bd495addc0
    *8cf6782b740c1e962a328972a24788aa5f83e8aa5dee21b3cbe36e5fb0172c3e6463e147540e82
    *7dfd66fec690fd60cc37275d89843c5c4e5723291386ce6cda4553542f8d366f12735bf85a8fd5
    *d74ebdb128ba493498477ab1bf30a03fd26bfdc52fd666e80ca299101cc6acd60369200d2116f7
    *e5c5e203a1ac9238f92d8046fe43999f4dacfca95b9fc61aabbe9baa3e4931f9db98a41c7af6c8
    *4b110f1aa8432f84816f21190270158560000c64f30ff7e1fc013a62b880a601cc7c21c8fae80f
    *8f8138fde5c72118b1e90e1ee5360310adbc8febf5021a9b387b4d286bfc978e946712732fdb0c
    *b74a7bacdfde2a23afd52af3fcf5b36e6d952496d447875e3a3517ba3504929cb257a0ae792e2f
    *8d249c00d1e0d35c817648b24bcd34e7ff87e53f3f9439b0f5bfadfff783839b5f1df8fedf3fc9
    *7f3eca2fccfbf379970c670fffcf3389eb4e91868369f3f51e6b3eca5064a4b7b00657b305cbba
    *294488788c90666bf3ef2ba8fd8d7ec3eb1fcfa3fd0fae8384bcb76ef5ae7f7cb6d7ff97b76fc3
    *fabf7505fddbfafbb75fff5be7ff79537cd811b065ffffe2f0961bffe3ab9b5fdefcb4ff7f8cdf
    *36f97f8fb4dfbd1620197ff82c411c9a200e6d394e304b8c7fd053fe3a2dc7ac4ca739fc275b14
    *e5acc92b295b76230d98510894377f93f6b3c5be40460171b752def25f756959cc0ba09ad4f7b4
    *c518492169314551529ef7a9e6a457faec4604c0c601956e79dc44391acba093ec4c50b46722c6
    *5f86071e8d5b8641de7529d2e6588fb4a35109c30a11284b2a9fa36ff3a61e29579854c4cc67fb
    *c4442a7535a1c7094add54f428e404c57c8cb8d44c0138e28fbff2e9c34a96620ec5b32c88af1a
    *204e06defbc61250c2b8f680256073656b92e216a592808492beac598e37e4a26d404e03330b7f
    *73fc8bf9f8df798217e4861c3534a29253d5ed0c289dd247f166fd87b2d157b4857c8be215626d
    *cf4462c42e22f636522ddd18393668647b61245c608209e36d146abe8f54926bcac2dd20d62793
    *6d68086760c6f564fd51c46e03e430941c446e9e3f01005cebae11a8cab2d1e8d73dbf79f75e31
    *8c8ee631bf4d50e62fdadbf86ab1f4051ff1ff84e66aac69fad91971fa67ac59b4c7022d229647
    *ac41634cadc2ce077eadb2af719473f59a93ad3e2a66021c76b62a3b482ce1f1f30941f235e0f1
    *a3681efea3d13c4b5ba578b0680393363c2a0151811a9891e12d3a84022fb25f1277c9bf8044e5
    *4bfa88af9d65de9ca3fd19ce32ecf775d6f66f02d61ac062f1cbf11a47f5a51e460e7c3d8223e2
    *f73eee3efd3efd3efd3efd3efdc4efff0167ea414c00020300
    }
    
    Data.Set.Unboxed