Îõ³h$MIr£      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop q r s t u v w x y z { | } ~  €  ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ  Ž   ‘ ’ “ ” • – — ˜ ™ š › œ  ž Ÿ   ¡ ¢ )(c) 2011 diagrams-core team (see LICENSE)BSD-style (see LICENSE)!diagrams-discuss@googlegroups.com Safe-Inferred>ÀÁ  monoid-extrasÐType class for monoid (and semigroup) actions, where monoidal values of type m! "act" on values of another type s/. Instances are required to satisfy the laws act mempty = id 'act (m1 `mappend` m2) = act m1 . act m2ÈSemigroup instances are required to satisfy the second law but with (£ ) instead of ¤. Additionally, if the type s! has any algebraic structure, act m/ should be a homomorphism. For example, if s! is also a monoid we should have act m mempty = mempty and  b) = f a <> f b. monoid-extrasNothing acts as the identity; Just m acts as m. monoid-extras() acts as the identity..(c) 2011-2015 diagrams-core team (see LICENSE)BSD-style (see LICENSE)!diagrams-discuss@googlegroups.com Safe-Inferred3>ÀÁÂÖ×h  monoid-extrasm :+: n is the coproduct of monoids m and n. Values of type m :+: n! consist of alternating lists of m and n˜ values. The empty list is the identity, and composition is list concatenation, with appropriate combining of adjacent elements when possible. monoid-extras0Injection from the left monoid into a coproduct. monoid-extras1Injection from the right monoid into a coproduct. monoid-extras%Prepend a value from the left monoid.  monoid-extras&Prepend a value from the right monoid.  monoid-extraskillRç takes a value in a coproduct monoid and sends all the values from the right monoid to the identity.  monoid-extraskillLæ takes a value in a coproduct monoid and sends all the values from the left monoid to the identity.  monoid-extras•Take a value from a coproduct monoid where the left monoid has an action on the right, and "untangle" it into a pair of values. In particular, 'm1 <> n1 <> m2 <> n2 <> m3 <> n3 <> ... is sent to ß(m1 <> m2 <> m3 <> ..., (act m1 n1) <> (act (m1 <> m2) n2) <> (act (m1 <> m2 <> m3) n3) <> ...)That is, before combining n values, every n! value is acted on by all the m values to its left.  monoid-extrasÔCoproducts act on other things by having each of the components act individually. monoid-extras0The coproduct of two monoids is itself a monoid.  .(c) 2012-2015 diagrams-core team (see LICENSE)BSD-style (see LICENSE)!diagrams-discuss@googlegroups.com Safe-Inferred3567ì monoid-extrasA value of type Cut m is either a single m, or a pair of mÄ's separated by a divider. The divider represents a "cut point".Cut is similar to Data.Monoid.SplitÙ, but split keeps only the rightmost divider and accumulates all values, whereas cut always keeps the leftmost and rightmost divider, coalescing them into one and throwing away all the information in between.Split! uses the asymmetric constructor :|, and Cut the symmetric constructor :||:,, to emphasize the inherent asymmetry of Split and symmetry of Cut. SplitÈ keeps only the rightmost split and combines everything on the left; CutÅ keeps the outermost splits and throws away everything in between. monoid-extrasA convenient name for mempty :||: mempty, so composing with cut' introduces a cut point. For example, &Uncut a <> cut <> Uncut b == a :||: b. monoid-extrasIf m is a  Semigroup, then Cut m" is a semigroup which contains m? as a sub-semigroup, but also contains elements of the form  m1 :||: m2. When elements of mï combine with such "cut" elements they are combined with the value on the corresponding side of the cut (e.g. 4(Uncut m1) <> (m1' :||: m2) = (m1 <> m1') :||: m2ó). When two "cut" elements meet, the two inside values are thrown away and only the outside values are kept.5.(c) 2011-2015 diagrams-core team (see LICENSE)BSD-style (see LICENSE)!diagrams-discuss@googlegroups.com Safe-Inferred3567Õ monoid-extrasIf m is a ¥, then  Deletable m? (intuitively speaking) adds two distinguished new elements [ and ]Ý, such that an occurrence of [ "deletes" everything from it to the next ]. For example, abc[def]gh == abcgh'This is all you really need to know to use  Deletable m= values; to understand the actual implementation, read on.èTo properly deal with nesting and associativity we need to be able to assign meanings to things like [[, ][-, and so on. (We cannot just define, say, [[ == [ , since then ([[)] == [] == id but [([]) == [id == [.) Formally, elements of Deletable m6 are triples of the form (r, m, l) representing words  ]^r m [^lÕ. When combining two triples (r1, m1, l1) and (r2, m2, l2) there are three cases:ùIf l1 == r2 then the [s from the left and ]s from the right exactly cancel, and we are left with (r1, m1 <> m2, l2).›If l1 < r2 then all of the [s cancel with some of the ]s, but m1 is still inside the remaining ]s and is deleted, yielding (r1 + r2 - l1, m2, l2)0The remaining case is symmetric with the second. monoid-extras#Project the wrapped value out of a  value.  monoid-extrasInject a value into a $ wrapper. Satisfies the property unDelete . toDeletable === id! monoid-extrasáA "left bracket", which causes everything between it and the next right bracket to be deleted." monoid-extrasÍA "right bracket", denoting the end of the section that should be deleted. !" !".(c) 2013-2015 diagrams-core team (see LICENSE)BSD-style (see LICENSE)!diagrams-discuss@googlegroups.com Safe-Inferred2?!z+ monoid-extrasAn + in a given ¦Ó is a morphism from some object to itself. The set of endomorphisms for a particular object form a monoid, with composition as the combining operation and the identity morphism as the identity element.+,-+,-.(c) 2012-2015 diagrams-core team (see LICENSE)BSD-style (see LICENSE)!diagrams-discuss@googlegroups.com Safe-Inferred3567>À(¯2 monoid-extras The type a! extended with negative infinity.3 monoid-extras The type a! extended with positive infinity.4 monoid-extrasInf p a represents the type a‚ extended with a new "infinite" value, which is treated as either positive or negative infinity depending on the type index p&. This type exists mostly for its §, ¨, and ¥ instances.7 monoid-extras(Type index indicating negative infinity.8 monoid-extras(Type index indicating positive infinity.9 monoid-extrasÚFind the minimum of a list of values. Returns positive infinity iff the list is empty.: monoid-extrasÚFind the maximum of a list of values. Returns negative infinity iff the list is empty.; monoid-extrasPositive infinity.< monoid-extrasNegative infinity.= monoid-extrasÖEmbed a finite value into the space of such values extended with positive infinity.> monoid-extrasÖEmbed a finite value into the space of such values extended with negative infinity.A monoid-extrasÅAn ordered type extended with negative infinity is a monoid under ©1, with negative infinity as the identity element.B monoid-extrasÅAn ordered type extended with positive infinity is a monoid under ª1, with positive infinity as the identity element.C monoid-extrasÈAn ordered type extended with negative infinity is a semigroup under ©.D monoid-extrasÈAn ordered type extended with positive infinity is a semigroup under ª.E monoid-extras0Negative infinity is less than any finite value.F monoid-extras3Positive infinity is greater than any finite value. 23456789:;<=> 45687329:;<=>)(c) 2011 diagrams-core team (see LICENSE)BSD-style (see LICENSE)!diagrams-discuss@googlegroups.comNone >?ÀÁÂÉÎÖ×-eP monoid-extrasSMà, an abbreviation for "single monoid" (as opposed to a heterogeneous list of monoids), is only used internally to help guide instance selection when defining the action of heterogeneous monoidal lists on each other.R monoid-extras The relation l :>: a holds when a! is the type of an element in l. For example, '(Char ::: Int ::: Bool ::: Nil) :>: Int.S monoid-extras:Inject a value into an otherwise empty heterogeneous list.T monoid-extrasGet the value of type a/ from a heterogeneous list, if there is one.U monoid-extrasAlter the value of type a& by applying the given function to it.V monoid-extrasìType class for heterogeneous monoidal lists, with a single method allowing construction of an empty list.W monoid-extrasThe empty heterogeneous list of type l . Of course,  empty == « , but unlike «, empty does not require ¥$ constraints on all the elements of l. PQRTSUVWXY XYVWRTSUPQX5Y5.(c) 2012-2015 diagrams-core team (see LICENSE)BSD-style (see LICENSE)!diagrams-discuss@googlegroups.com Safe-Inferred35670ðb monoid-extrasA value of type  Recommend a consists of a value of type a0 wrapped up in one of two constructors. The  Recommend™ constructor indicates a "non-committal recommendation"---that is, the given value should be used if no other/better values are available. The Commitæ constructor indicates a "commitment"---a value which should definitely be used, overriding any  Recommend ed values.e monoid-extrasExtract the value of type a wrapped in  Recommend a.g monoid-extrasd overrides b6. Two values wrapped in the same constructor (both b or both d.) are combined according to the underlying  Semigroup instance.bcdebcde  Safe-Inferred>ÀÁÂÑ7/p monoid-extras#The semi-direct product of monoids s and m, which is a monoid when m acts on s:. Structurally, the semi-direct product is just a pair (s,m)Ç. However, the monoid instance is different. In particular, we have 4(s1,m1) <> (s2,m2) = (s1 <> (m1 `act` s2), m1 <> m2)We think of the m" values as a "tag" decorating the s* values, which also affect the way the s values combine.We call the monoid m$ the quotient monoid and the monoid sÊ the sub-monoid of the semi-direct product. The semi-direct product Semi s m is an extension of the monoid s with m being the quotient.r monoid-extrasTag an s value with an m: value to create an element of the semi-direct product.s monoid-extrasThe injection map, i.e. give an s value a trivial tag.t monoid-extras%Forget the monoidal tag. Of course, untag . inject = id , and untag (tag s m) = s.u monoid-extras'Embed a "tag" value as a value of type Semi s m . Note that inject s <> embed m = tag s mandembed m <> inject s = tag (act m s) m@3The semi-direct product gives a split extension of s by m. This allows us to embed mø into the semi-direct product. This is the embedding map. The quotient and embed maps should satisfy the equation quotient . embed = id.v monoid-extrasThe quotient map, i.e.! retrieve the monoidal tag value.pqrstuvpqrstuv  Safe-Inferred>ÀÁÂÑ<ìy monoid-extras#The semi-direct product of monoids s and m, which is a monoid when m acts on s:. Structurally, the semi-direct product is just a pair (s,m)Ç. However, the monoid instance is different. In particular, we have 4(s1,m1) <> (s2,m2) = (s1 <> (m1 `act` s2), m1 <> m2)We call the monoid m$ the quotient monoid and the monoid sÊ the sub-monoid of the semi-direct product. The semi-direct product Semi s m is an extension of the monoid s with m being the quotient.{ monoid-extrasTag an s value with an m: value to create an element of the semi-direct product.| monoid-extrasThe injection map, i.e. give an s value a trivial tag.} monoid-extras%Forget the monoidal tag. Of course, untag . inject = id , and untag (tag s m) = s.~ monoid-extras'Embed a "tag" value as a value of type Semi s m . Note that inject s <> embed m = tag s mandembed m <> inject s = tag (act m s) m@3The semi-direct product gives a split extension of s by m. This allows us to embed mø into the semi-direct product. This is the embedding map. The quotient and embed maps should satisfy the equation quotient . embed = id. monoid-extrasThe quotient map, i.e.! retrieve the monoidal tag value.yz{|}~yz{|}~ .(c) 2011-2015 diagrams-core team (see LICENSE)BSD-style (see LICENSE)!diagrams-discuss@googlegroups.com Safe-Inferred3567>ÀÁÂCA‚ monoid-extrasA value of type Split m is either a single m, or a pair of m#'s separated by a divider. Single m's combine as usual; single m÷'s combine with split values by combining with the value on the appropriate side; when two split values meet only the rightmost split is kept, with both the values from the left split combining with the left-hand value of the right split.Data.Monoid.Cut> is similar, but uses a different scheme for composition. Split! uses the asymmetric constructor :| , and Cut the symmetric constructor :||:,, to emphasize the inherent asymmetry of Split and symmetry of Cut. SplitÈ keeps only the rightmost split and combines everything on the left; CutÅ keeps the outermost splits and throws away everything in between.… monoid-extrasA convenient name for mempty :| mempty, so  M a <> split <> M b == a :| b.† monoid-extrasú"Unsplit" a split monoid value, combining the two values into one (or returning the single value if there is no split).‡ monoid-extrasóBy default, the action of a split monoid is the same as for the underlying monoid, as if the split were removed.‰ monoid-extrasIf m is a  Semigroup, then Split mè is a semigroup which combines values on either side of a split, keeping only the rightmost split.‚„ƒ…†‚„ƒ…†„5 )(c) 2011 diagrams-core team (see LICENSE)BSD-style (see LICENSE)!diagrams-discuss@googlegroups.com Safe-Inferred->ÀEA‘ monoid-extrasFor base < 4.11, the Monoid'à constraint is a synonym for things which are instances of both ¨ and ¥). For base version 4.11 and onwards, Monoid has  Semigroup< as a superclass already, so for backwards compatibility Monoid'! is provided as a synonym for Monoid.‘‘ )(c) 2015 diagrams-core team (see LICENSE)BSD-style (see LICENSE)!diagrams-discuss@googlegroups.com Safe-Inferred ->ÀÁÂÔÖ×ÙIB ’ monoid-extrasm :+: n is the coproduct of monoids m and n$. Concatentation is equivilent to ?(m1 :+: n1) <> (m2 :+: n2) = (m1 <> m2) :+: (n1 <> act m1 n2)@ 1but has a more efficient internal implimentation.“ monoid-extras(Construct a coproduct with a left value.” monoid-extras)Construct a coproduct with a right value.• monoid-extrasPrepend a value from the left.– monoid-extrasPrepend a value from the right.— monoid-extrasExtract m from a coproduct.˜ monoid-extrasExtract n from a coproduct.š monoid-extrasLens onto the both m and n.› monoid-extras(Lens onto the left value of a coproduct.œ monoid-extras)Lens onto the right value of a coproduct.Ÿ monoid-extrasÔCoproducts act on other things by having each of the components act individually. ’“”•–—˜™š›œ ’“”•–˜—™š›œ¬ !"#$%&'()*++,-./01234567889:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmmnopqrstuvwxy z { | } ~  €  ‚ z { | } ~  €  ‚ ƒ „ … † ‡ ˆ ‰ Š ‹ Œ  Ž   ‘ ’    “ ”    • – — ˜ ™    š›œš›š›žšŸ ¡¢£š›¤¡¢¥¡¢¦š›§¨(monoid-extras-0.6-2fxV9nJOxh36Jl0p1Yp8B7Data.Monoid.ActionData.Monoid.CoproductData.Monoid.CutData.Monoid.DeletableData.Monoid.EndomorphismData.Monoid.InfData.Monoid.MListData.Monoid.RecommendData.Monoid.SemiDirectProduct$Data.Monoid.SemiDirectProduct.StrictData.Monoid.SplitData.Monoid.WithSemigroupData.Monoid.Coproduct.StrictActionact $fActionEndoa$fActionMaybes $fAction()l:+:inLinRmappendLmappendRkillRkillLuntangle $fAction:+:r $fMonoid:+:$fSemigroup:+: $fShow:+:CutUncut:||:cut $fMonoidCut$fSemigroupCut $fDataCut $fShowCut $fReadCut $fFunctorCut $fFoldableCut$fTraversableCut DeletableunDelete toDeletabledeleteLdeleteR$fMonoidDeletable$fSemigroupDeletable$fDataDeletable$fShowDeletable$fReadDeletable$fFunctorDeletable$fFoldableDeletable$fTraversableDeletable EndomorphismgetEndomorphism$fGroupEndomorphism$fMonoidEndomorphism$fSemigroupEndomorphism$fShowEndomorphismNegInfPosInfInfInfinityFiniteNegPosminimummaximumposInftynegInfty posFinite negFinite $fMonadInf$fApplicativeInf $fMonoidInf $fMonoidInf0$fSemigroupInf$fSemigroupInf0$fOrdInf $fOrdInf0 $fBoundedInf $fBoundedInf0 $fDataInf $fShowInf $fReadInf$fEqInf $fFunctorInf $fFoldableInf$fTraversableInfSM:>:injgetaltMListempty:::*: $fMList(,) $fMList() $f:>:(,)a $f:>:(,)a0 $fActionSM(,) $fActionSM() $fAction(,)l2$fShowSM RecommendCommit getRecommend$fMonoidRecommend$fSemigroupRecommend$fShowRecommend$fReadRecommend$fFunctorRecommend $fEqRecommend$fOrdRecommend$fDataRecommend$fFoldableRecommend$fTraversableRecommendSemiunSemitaginjectuntagembedquotient $fMonoidSemi$fSemigroupSemiSplitM:|splitunsplit$fActionSplitn $fMonoidSplit$fSemigroupSplit $fDataSplit $fShowSplit $fReadSplit $fEqSplit$fFunctorSplit$fFoldableSplit$fTraversableSplitMonoid'prependLprependR untangled_L_R$fMonoidPossible$fSemigroupPossiblebaseGHC.Base<>mappendMonoidControl.CategoryCategoryghc-prim GHC.ClassesOrd Semigroupmaxminmempty