Stability | experimental |
---|---|

Maintainer | conal@conal.net |

# Least upper bounds

Types that support information merging (`lub`

)

Least upper information bound. Combines information available from each argument. The arguments must be consistent, i.e., must have a common upper bound.

n-ary `lub`

. Defaults to `foldr lub undefined`

# Some useful special applications of `lub`

parCommute :: HasLub b => (a -> a -> b) -> a -> a -> bSource

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.

Similar to `parCommute`

, but uses `lub`

instead of `unamb`

.