|
Data.Lub | Stability | experimental | Maintainer | conal@conal.net |
|
|
|
|
|
Description |
Compute least upper bound (lub) of two values, with respect to
information content. I.e., merge the information available in each.
|
|
Synopsis |
|
|
|
|
Least upper bounds
|
|
|
Types that support information merging (lub)
| | Methods | | Least upper information bound. Combines information available from
each argument. The arguments must be consistent, i.e., must have a
common upper bound.
|
| | Instances | |
|
|
|
A lub for flat domains. Equivalent to unamb. Handy for defining
HasLub instances, e.g.,
instance HasLub Integer where lub = flatLub
|
|
Some useful special applications of lub
|
|
parCommute :: HasLub a => (a -> a -> a) -> a -> a -> a | Source |
|
Turn a binary commutative operation into that tries both orders in
parallel, lub-merging the results. Useful when there are special
cases that don't require evaluating both arguments.
|
|
|
Parallel or
|
|
|
Parallel and
|
|
|
Multiplication optimized for either argument being zero or one, where
the other might be expensive/delayed.
|
|
Produced by Haddock version 2.3.0 |