Copyright | (c) Michal Konecny Eike Neumann |
---|---|
License | BSD3 |
Maintainer | mikkonecny@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Branching operations for sequences
- type SeqBoolP = SequenceP (Maybe Bool)
- type SeqBoolA to = SequenceA to (Maybe Bool)
- type SeqBool = SeqBoolA (->)
- pBool :: SeqBoolP
- data SequenceAtAccuracy a = SequenceAtAccuracy (Sequence a) AccuracySG
- pickNonZeroSeqA :: (QAArrow to, CanPickNonZero a) => Maybe (QAId to) -> [(SequenceA to a, s)] `to` Maybe (SequenceA to a, s)
- pick :: QAArrow to => Maybe (QAId to) -> [SequenceA to (Maybe a)] `to` a
Documentation
data SequenceAtAccuracy a Source #
SequenceAtAccuracy exists only so that we can QuickCheck that Sequence satisfies properties whose statement relies on an instance of HasEqCertainly. Sequence is not an instance but SequenceAtAccuracy is.
Show a => Show (SequenceAtAccuracy a) Source # | |
(HasOrderAsymmetric a b, SuitableForSeq a, SuitableForSeq b, SuitableForSeq (OrderCompareType a b)) => HasOrderAsymmetric (SequenceAtAccuracy a) (SequenceAtAccuracy b) Source # | |
(HasEqAsymmetric a b, SuitableForSeq a, SuitableForSeq b, SuitableForSeq (EqCompareType a b)) => HasEqAsymmetric (SequenceAtAccuracy a) (SequenceAtAccuracy b) Source # | |
type OrderCompareType (SequenceAtAccuracy a) (SequenceAtAccuracy b) Source # | |
type EqCompareType (SequenceAtAccuracy a) (SequenceAtAccuracy b) Source # | |
pickNonZeroSeqA :: (QAArrow to, CanPickNonZero a) => Maybe (QAId to) -> [(SequenceA to a, s)] `to` Maybe (SequenceA to a, s) Source #
Given a list [(a1,b1),(a2,b2),...]
and assuming that
at least one of a1,a2,...
is non-zero, pick one of them
and return the corresponding pair (ai,bi)
.
If none of a1,a2,...
is zero, either throw an exception
or loop forever.
Orphan instances
CanPickNonZero a => CanPickNonZero (Sequence a) Source # | |
(QAArrow to, ArrowApply to, HasIfThenElse b t, HasIfThenElse b (to AccuracySG t), (~) * (IfThenElseType b (to AccuracySG t)) (to AccuracySG (IfThenElseType b t)), SuitableForSeq b, SuitableForSeq t, SuitableForSeq (IfThenElseType b t)) => HasIfThenElse (SequenceA to b) (SequenceA to t) Source # | "parallel if" |