Copyright | FOAM team <http://foam.space> 2018 |
---|---|
License | BSD3 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | unportable |
Safe Haskell | None |
Language | Haskell2010 |
Parallel multiple event filters.
Synopsis
- data MultiFilter (es :: [*]) where
- NilFilters :: MultiFilter '[]
- (:?) :: Filter e -> MultiFilter es -> MultiFilter (e ': es)
- minStartBlock :: MultiFilter es -> DefaultBlock
- minEndBlock :: MultiFilter es -> DefaultBlock
- modifyMultiFilter :: (forall e. Filter e -> Filter e) -> MultiFilter es -> MultiFilter es
- multiEvent :: (PollFilters es, QueryAllLogs es, MapHandlers m es (WithChange es), RPureConstrained HasLogIndex (WithChange es), RecApplicative (WithChange es), JsonRpc m) => MultiFilter es -> Handlers es (ReaderT Change m EventAction) -> m ()
- multiEventMany :: (PollFilters es, QueryAllLogs es, MapHandlers m es (WithChange es), RPureConstrained HasLogIndex (WithChange es), RecApplicative (WithChange es), JsonRpc m) => MultiFilter es -> Integer -> Handlers es (ReaderT Change m EventAction) -> m ()
- multiEventNoFilter :: (QueryAllLogs es, MapHandlers m es (WithChange es), RPureConstrained HasLogIndex (WithChange es), RecApplicative (WithChange es), JsonRpc m) => MultiFilter es -> Handlers es (ReaderT Change m EventAction) -> m ()
- multiEventManyNoFilter :: (QueryAllLogs es, MapHandlers m es (WithChange es), RPureConstrained HasLogIndex (WithChange es), RecApplicative (WithChange es), JsonRpc m) => MultiFilter es -> Integer -> Handlers es (ReaderT Change m EventAction) -> m ()
- type Handlers (ts :: [Type]) b = Rec (Handler b) ts
- newtype Handler b a = H (a -> b)
- data Rec (a :: u -> Type) (b :: [u]) :: forall u. (u -> Type) -> [u] -> Type where
The MultiFilter
type
data MultiFilter (es :: [*]) where Source #
MultiFilters
NilFilters :: MultiFilter '[] | |
(:?) :: Filter e -> MultiFilter es -> MultiFilter (e ': es) infixr 5 |
minStartBlock :: MultiFilter es -> DefaultBlock Source #
minEndBlock :: MultiFilter es -> DefaultBlock Source #
modifyMultiFilter :: (forall e. Filter e -> Filter e) -> MultiFilter es -> MultiFilter es Source #
With geth filters
multiEvent :: (PollFilters es, QueryAllLogs es, MapHandlers m es (WithChange es), RPureConstrained HasLogIndex (WithChange es), RecApplicative (WithChange es), JsonRpc m) => MultiFilter es -> Handlers es (ReaderT Change m EventAction) -> m () Source #
multiEventMany :: (PollFilters es, QueryAllLogs es, MapHandlers m es (WithChange es), RPureConstrained HasLogIndex (WithChange es), RecApplicative (WithChange es), JsonRpc m) => MultiFilter es -> Integer -> Handlers es (ReaderT Change m EventAction) -> m () Source #
Without geth filters
multiEventNoFilter :: (QueryAllLogs es, MapHandlers m es (WithChange es), RPureConstrained HasLogIndex (WithChange es), RecApplicative (WithChange es), JsonRpc m) => MultiFilter es -> Handlers es (ReaderT Change m EventAction) -> m () Source #
multiEventManyNoFilter :: (QueryAllLogs es, MapHandlers m es (WithChange es), RPureConstrained HasLogIndex (WithChange es), RecApplicative (WithChange es), JsonRpc m) => MultiFilter es -> Integer -> Handlers es (ReaderT Change m EventAction) -> m () Source #
Re-exports
type Handlers (ts :: [Type]) b = Rec (Handler b) ts #
'Handlers ts b', is essentially a list of functions, one for each type in
ts. All functions produce a value of type b
. Hence, 'Handlers ts b' would
represent something like the type-level list: [t -> b | t in ts ]
data Rec (a :: u -> Type) (b :: [u]) :: forall u. (u -> Type) -> [u] -> Type where #
A record is parameterized by a universe u
, an interpretation f
and a
list of rows rs
. The labels or indices of the record are given by
inhabitants of the kind u
; the type of values at any label r :: u
is
given by its interpretation f r :: *
.
RNil :: forall u (a :: u -> Type) (b :: [u]). Rec a ([] :: [u]) | |
(:&) :: forall u (a :: u -> Type) (b :: [u]) (r :: u) (rs :: [u]). !(a r) -> !(Rec a rs) -> Rec a (r ': rs) infixr 7 |
Instances
RecSubset (Rec :: (k -> Type) -> [k] -> Type) ([] :: [k]) (ss :: [k]) ([] :: [Nat]) | |
Defined in Data.Vinyl.Lens type RecSubsetFCtx Rec f :: Constraint # | |
(RElem r ss i, RSubset rs ss is) => RecSubset (Rec :: (k -> Type) -> [k] -> Type) (r ': rs :: [k]) (ss :: [k]) (i ': is) | |
Defined in Data.Vinyl.Lens type RecSubsetFCtx Rec f :: Constraint # | |
RecElem (Rec :: (a -> Type) -> [a] -> Type) (r :: a) (r' :: a) (r ': rs :: [a]) (r' ': rs :: [a]) Z | |
Defined in Data.Vinyl.Lens type RecElemFCtx Rec f :: Constraint # | |
(RIndex r (s ': rs) ~ S i, RecElem (Rec :: (a -> Type) -> [a] -> Type) r r' rs rs' i) => RecElem (Rec :: (a -> Type) -> [a] -> Type) (r :: a) (r' :: a) (s ': rs :: [a]) (s ': rs' :: [a]) (S i) | |
Defined in Data.Vinyl.Lens type RecElemFCtx Rec f :: Constraint # | |
TestCoercion f => TestCoercion (Rec f :: [u] -> Type) | |
Defined in Data.Vinyl.Core | |
TestEquality f => TestEquality (Rec f :: [u] -> Type) | |
Defined in Data.Vinyl.Core | |
Eq (Rec f ([] :: [u])) | |
(Eq (f r), Eq (Rec f rs)) => Eq (Rec f (r ': rs)) | |
Ord (Rec f ([] :: [u])) | |
Defined in Data.Vinyl.Core | |
(Ord (f r), Ord (Rec f rs)) => Ord (Rec f (r ': rs)) | |
Defined in Data.Vinyl.Core compare :: Rec f (r ': rs) -> Rec f (r ': rs) -> Ordering # (<) :: Rec f (r ': rs) -> Rec f (r ': rs) -> Bool # (<=) :: Rec f (r ': rs) -> Rec f (r ': rs) -> Bool # (>) :: Rec f (r ': rs) -> Rec f (r ': rs) -> Bool # (>=) :: Rec f (r ': rs) -> Rec f (r ': rs) -> Bool # max :: Rec f (r ': rs) -> Rec f (r ': rs) -> Rec f (r ': rs) # min :: Rec f (r ': rs) -> Rec f (r ': rs) -> Rec f (r ': rs) # | |
(RMap rs, ReifyConstraint Show f rs, RecordToList rs) => Show (Rec f rs) | Records may be shown insofar as their points may be shown.
|
Generic (Rec f ([] :: [u])) | |
Generic (Rec f rs) => Generic (Rec f (r ': rs)) | |
Semigroup (Rec f ([] :: [u])) | |
(Semigroup (f r), Semigroup (Rec f rs)) => Semigroup (Rec f (r ': rs)) | |
Monoid (Rec f ([] :: [u])) | |
(Monoid (f r), Monoid (Rec f rs)) => Monoid (Rec f (r ': rs)) | |
Storable (Rec f ([] :: [u])) | |
Defined in Data.Vinyl.Core | |
(Storable (f r), Storable (Rec f rs)) => Storable (Rec f (r ': rs)) | |
Defined in Data.Vinyl.Core sizeOf :: Rec f (r ': rs) -> Int # alignment :: Rec f (r ': rs) -> Int # peekElemOff :: Ptr (Rec f (r ': rs)) -> Int -> IO (Rec f (r ': rs)) # pokeElemOff :: Ptr (Rec f (r ': rs)) -> Int -> Rec f (r ': rs) -> IO () # peekByteOff :: Ptr b -> Int -> IO (Rec f (r ': rs)) # pokeByteOff :: Ptr b -> Int -> Rec f (r ': rs) -> IO () # | |
type RecSubsetFCtx (Rec :: (k -> Type) -> [k] -> Type) (f :: k -> Type) | |
Defined in Data.Vinyl.Lens | |
type RecSubsetFCtx (Rec :: (k -> Type) -> [k] -> Type) (f :: k -> Type) | |
Defined in Data.Vinyl.Lens | |
type RecElemFCtx (Rec :: (a -> Type) -> [a] -> Type) (f :: a -> Type) | |
Defined in Data.Vinyl.Lens | |
type RecElemFCtx (Rec :: (a -> Type) -> [a] -> Type) (f :: a -> Type) | |
Defined in Data.Vinyl.Lens | |
type Rep (Rec f (r ': rs)) | |
Defined in Data.Vinyl.Core type Rep (Rec f (r ': rs)) = C1 (MetaCons ":&" (InfixI RightAssociative 7) False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (f r)) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rep (Rec f rs))) | |
type Rep (Rec f ([] :: [u])) | |
Defined in Data.Vinyl.Core |