Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
data Module (name :: Symbol) (check :: Type) (deliver :: Type) (query :: Type) (es :: EffectRow) (deps :: [Component]) (r :: EffectRow) Source #
Module | |
|
Instances
(Members (DependencyEffs deps) (Effs (m' ': ms) s), Members TxEffs (Effs (m' ': ms) s), Members BaseEffs (Effs (m' ': ms) s), Eval (m' ': ms) s) => Eval (Module name check deliver query es deps ': (m' ': ms)) s Source # | |
Defined in Tendermint.SDK.Application.Module eval :: forall proxy (r :: EffectRow). proxy s -> ModuleList (Module name check deliver query es deps ': (m' ': ms)) r -> forall a. Sem (Effs (Module name check deliver query es deps ': (m' ': ms)) s) a -> Sem (TxEffs :& BaseAppEffs s) a Source # | |
DependencyEffs deps ~ ('[] :: [Effect]) => Eval '[Module name check deliver query es deps] core Source # | |
Defined in Tendermint.SDK.Application.Module eval :: forall proxy (r :: EffectRow). proxy core -> ModuleList '[Module name check deliver query es deps] r -> forall a. Sem (Effs '[Module name check deliver query es deps] core) a -> Sem (TxEffs :& BaseAppEffs core) a Source # | |
ToApplication (m' ': ms) r => ToApplication (Module name check deliver query es deps ': (m' ': ms)) r Source # | |
Defined in Tendermint.SDK.Application.Module type ApplicationC (Module name check deliver query es deps ': (m' ': ms)) Source # type ApplicationD (Module name check deliver query es deps ': (m' ': ms)) Source # type ApplicationQ (Module name check deliver query es deps ': (m' ': ms)) Source # toApplication :: ModuleList (Module name check deliver query es deps ': (m' ': ms)) r -> Application (ApplicationC (Module name check deliver query es deps ': (m' ': ms))) (ApplicationD (Module name check deliver query es deps ': (m' ': ms))) (ApplicationQ (Module name check deliver query es deps ': (m' ': ms))) r r Source # | |
ToApplication '[Module name check deliver query es deps] r Source # | |
Defined in Tendermint.SDK.Application.Module type ApplicationC '[Module name check deliver query es deps] Source # type ApplicationD '[Module name check deliver query es deps] Source # type ApplicationQ '[Module name check deliver query es deps] Source # toApplication :: ModuleList '[Module name check deliver query es deps] r -> Application (ApplicationC '[Module name check deliver query es deps]) (ApplicationD '[Module name check deliver query es deps]) (ApplicationQ '[Module name check deliver query es deps]) r r Source # | |
type ApplicationC (Module name check deliver query es deps ': (m' ': ms)) Source # | |
Defined in Tendermint.SDK.Application.Module type ApplicationC (Module name check deliver query es deps ': (m' ': ms)) = (name :> check) :<|> ApplicationC (m' ': ms) | |
type ApplicationC '[Module name check deliver query es deps] Source # | |
Defined in Tendermint.SDK.Application.Module | |
type ApplicationD (Module name check deliver query es deps ': (m' ': ms)) Source # | |
Defined in Tendermint.SDK.Application.Module type ApplicationD (Module name check deliver query es deps ': (m' ': ms)) = (name :> deliver) :<|> ApplicationD (m' ': ms) | |
type ApplicationD '[Module name check deliver query es deps] Source # | |
Defined in Tendermint.SDK.Application.Module | |
type ApplicationQ (Module name check deliver query es deps ': (m' ': ms)) Source # | |
Defined in Tendermint.SDK.Application.Module type ApplicationQ (Module name check deliver query es deps ': (m' ': ms)) = (name :> query) :<|> ApplicationQ (m' ': ms) | |
type ApplicationQ '[Module name check deliver query es deps] Source # | |
Defined in Tendermint.SDK.Application.Module | |
type Effs (Module name check deliver query es deps ': (m' ': ms)) s Source # | |
Defined in Tendermint.SDK.Application.Module | |
type Effs '[Module name check deliver query es deps] core Source # | |
Defined in Tendermint.SDK.Application.Module |
type family ModuleEffs (m :: Component) :: EffectRow where ... Source #
ModuleEffs (Module _ _ _ _ es deps) = es :& (DependencyEffs deps :& (TxEffs :& BaseEffs)) | |
ModuleEffs _ = TypeError ('Text "ModuleEffs is a partial function defined only on Component") |
data ModuleList (ms :: [Component]) r where Source #
NilModules :: ModuleList '[] r | |
(:+) :: Module name check deliver query es deps r -> ModuleList ms r -> ModuleList (Module name check deliver query es deps ': ms) r infixr 5 |
data Application check deliver query r s Source #
Application | |
|
class ToApplication ms r where Source #
type ApplicationC ms :: Type Source #
type ApplicationD ms :: Type Source #
type ApplicationQ ms :: Type Source #
toApplication :: ModuleList ms r -> Application (ApplicationC ms) (ApplicationD ms) (ApplicationQ ms) r r Source #
Instances
ToApplication (m' ': ms) r => ToApplication (Module name check deliver query es deps ': (m' ': ms)) r Source # | |
Defined in Tendermint.SDK.Application.Module type ApplicationC (Module name check deliver query es deps ': (m' ': ms)) Source # type ApplicationD (Module name check deliver query es deps ': (m' ': ms)) Source # type ApplicationQ (Module name check deliver query es deps ': (m' ': ms)) Source # toApplication :: ModuleList (Module name check deliver query es deps ': (m' ': ms)) r -> Application (ApplicationC (Module name check deliver query es deps ': (m' ': ms))) (ApplicationD (Module name check deliver query es deps ': (m' ': ms))) (ApplicationQ (Module name check deliver query es deps ': (m' ': ms))) r r Source # | |
ToApplication '[Module name check deliver query es deps] r Source # | |
Defined in Tendermint.SDK.Application.Module type ApplicationC '[Module name check deliver query es deps] Source # type ApplicationD '[Module name check deliver query es deps] Source # type ApplicationQ '[Module name check deliver query es deps] Source # toApplication :: ModuleList '[Module name check deliver query es deps] r -> Application (ApplicationC '[Module name check deliver query es deps]) (ApplicationD '[Module name check deliver query es deps]) (ApplicationQ '[Module name check deliver query es deps]) r r Source # |
hoistApplication :: HasTxRouter check r 'QueryAndMempool => HasTxRouter deliver r 'Consensus => HasQueryRouter query s => (forall a. Sem r a -> Sem r' a) -> (forall a. Sem s a -> Sem s' a) -> Application check deliver query r s -> Application check deliver query r' s' Source #
class Eval ms (core :: EffectRow) where Source #
eval :: proxy core -> ModuleList ms r -> forall a. Sem (Effs ms core) a -> Sem (TxEffs :& BaseAppEffs core) a Source #
Instances
(Members (DependencyEffs deps) (Effs (m' ': ms) s), Members TxEffs (Effs (m' ': ms) s), Members BaseEffs (Effs (m' ': ms) s), Eval (m' ': ms) s) => Eval (Module name check deliver query es deps ': (m' ': ms)) s Source # | |
Defined in Tendermint.SDK.Application.Module eval :: forall proxy (r :: EffectRow). proxy s -> ModuleList (Module name check deliver query es deps ': (m' ': ms)) r -> forall a. Sem (Effs (Module name check deliver query es deps ': (m' ': ms)) s) a -> Sem (TxEffs :& BaseAppEffs s) a Source # | |
DependencyEffs deps ~ ('[] :: [Effect]) => Eval '[Module name check deliver query es deps] core Source # | |
Defined in Tendermint.SDK.Application.Module eval :: forall proxy (r :: EffectRow). proxy core -> ModuleList '[Module name check deliver query es deps] r -> forall a. Sem (Effs '[Module name check deliver query es deps] core) a -> Sem (TxEffs :& BaseAppEffs core) a Source # |
makeApplication :: Eval ms core => ToApplication ms (Effs ms core) => HasTxRouter (ApplicationC ms) (Effs ms core) 'QueryAndMempool => HasTxRouter (ApplicationD ms) (Effs ms core) 'Consensus => HasQueryRouter (ApplicationQ ms) (Effs ms core) => Proxy core -> AnteHandler (Effs ms core) -> ModuleList ms (Effs ms core) -> (BeginBlock -> Sem (Effs ms core) ()) -> (EndBlock -> Sem (Effs ms core) EndBlockResult) -> Application (ApplicationC ms) (ApplicationD ms) (ApplicationQ ms) (TxEffs :& BaseAppEffs core) (QueryEffs :& BaseAppEffs core) Source #
applyAnteHandler :: HasTxRouter check r 'QueryAndMempool => HasTxRouter deliver r 'Consensus => AnteHandler r -> Application check deliver query r s -> Application check deliver query r s Source #