Copyright | (c) Michal Konecny |
---|---|
License | BSD3 |
Maintainer | mikkonecny@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Generic multivalued select operation
Documentation
class IsBool (SelectType k) => CanSelect k where Source #
type SelectType k Source #
Must be Bool or similar
:: k | |
-> k | |
-> SelectType k | True means that the first computation succeeded. |
Execute two lazy computations "in parallel" until one of them succeeds.
type CanSelectBool k = (CanSelect k, SelectType k ~ Bool) Source #
type CanSelectCNBool k = (CanSelect k, SelectType k ~ CN Bool) Source #
class CanSelectCountable k where Source #
type SelectCountableType k Source #
Must be Integer or similar
selectCountable :: (Integer -> k) -> SelectCountableType k Source #
Execute a sequence of lazy computations "in parallel" until one of them succeeds and return the index of a succeeding computation.
Instances
CanSelectCountable Kleenean Source # | |
Defined in AERN2.Select selectCountable :: (Integer -> Kleenean) -> SelectCountableType Kleenean Source # | |
CanSelectCountable (CN Kleenean) Source # | |
Defined in AERN2.Select type SelectCountableType (CN Kleenean) Source # selectCountable :: (Integer -> CN Kleenean) -> SelectCountableType (CN Kleenean) Source # |
type CanSelectCountableInteger k = (CanSelectCountable k, SelectCountableType k ~ Integer) Source #
type CanSelectCountableCNInteger k = (CanSelectCountable k, SelectCountableType k ~ CN Integer) Source #