Hoogle Search
Within LTS Haskell 24.3 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
ghc-internal GHC.Internal.Data.Monoid The dual of a Monoid, obtained by swapping the arguments of (<>).
Dual a <> Dual b == Dual (b <> a)
Examples
>>> Dual "Hello" <> Dual "World" Dual {getDual = "WorldHello"}
>>> Dual (Dual "Hello") <> Dual (Dual "World") Dual {getDual = Dual {getDual = "HelloWorld"}}
-
ghc-internal GHC.Internal.Data.Monoid No documentation available.
-
ghc-internal GHC.Internal.Data.Semigroup.Internal The dual of a Monoid, obtained by swapping the arguments of (<>).
Dual a <> Dual b == Dual (b <> a)
Examples
>>> Dual "Hello" <> Dual "World" Dual {getDual = "WorldHello"}
>>> Dual (Dual "Hello") <> Dual (Dual "World") Dual {getDual = Dual {getDual = "HelloWorld"}}
-
ghc-internal GHC.Internal.Data.Semigroup.Internal No documentation available.
-
numhask NumHask.Prelude The dual of a Monoid, obtained by swapping the arguments of (<>).
Dual a <> Dual b == Dual (b <> a)
Examples
>>> Dual "Hello" <> Dual "World" Dual {getDual = "WorldHello"}
>>> Dual (Dual "Hello") <> Dual (Dual "World") Dual {getDual = Dual {getDual = "HelloWorld"}}
-
numhask NumHask.Prelude No documentation available.
module Rebase.Data.Semigroupoid.
Dual No documentation available.
-
Rose (n-ary) trees with both upwards- (i.e. cached) and downwards-traveling (i.e. accumulating) monoidal annotations. This is used as the core data structure underlying the diagrams framework (https://diagrams.github.io), but potentially has other applications as well. Abstractly, a DUALTree is a rose (n-ary) tree with data (of type l) at leaves, data (of type a) at internal nodes, and two types of monoidal annotations, one (of type u) travelling "up" the tree and one (of type d) traveling "down". Specifically, there are five types of nodes:
- Leaf nodes which contain a data value of type l and an annotation of type u. The annotation represents information about a tree that should be accumulated (e.g. number of leaves, some sort of "weight", etc.). If you are familiar with finger trees (http://www.soi.city.ac.uk/~ross/papers/FingerTree.html, http://hackage.haskell.org/package/fingertree), it is the same idea.
- There is also a special type of leaf node which contains only a u value, and no data. This allows cached u values to be "modified" by inserting extra annotations.
- Branch nodes, containing a list of subtrees.
- Internal nodes with a value of type d. d may have an action on u (see the Action type class, defined in Data.Monoid.Action from the monoid-extras package). Semantically speaking, applying a d annotation to a tree transforms all the u annotations below it by acting on them. Operationally, however, since the action must be a monoid homomorphism, applying a d annotation can actually be done in constant time.
- Internal nodes with data values of type a, possibly of a different type than those in the leaves. These are just "along for the ride" and are unaffected by u and d annotations.
- The combined u annotation for an entire tree is always cached at the root and available in constant (amortized) time.
- The mconcat of all the d annotations along the path from the root to each leaf is available along with the leaf during a fold operation.
-
testing-feat Test.Feat.Enumerate The dual of a Monoid, obtained by swapping the arguments of (<>).
Dual a <> Dual b == Dual (b <> a)
Examples
>>> Dual "Hello" <> Dual "World" Dual {getDual = "WorldHello"}
>>> Dual (Dual "Hello") <> Dual (Dual "World") Dual {getDual = Dual {getDual = "HelloWorld"}}
-
testing-feat Test.Feat.Enumerate No documentation available.