This commit is contained in:
Dmitry Zuikov 2023-01-13 10:14:37 +03:00
parent cda69cacce
commit 7ba2eacdbc
3 changed files with 33 additions and 3 deletions

View File

@ -63,17 +63,18 @@ library
import: shared-properties import: shared-properties
exposed-modules: exposed-modules:
, HBS2.Defaults HBS2.Clock
, HBS2.Clock
, HBS2.Data.Types , HBS2.Data.Types
, HBS2.Data.Types.Refs , HBS2.Data.Types.Refs
, HBS2.Defaults
, HBS2.Hash , HBS2.Hash
, HBS2.Merkle , HBS2.Merkle
, HBS2.Net.Messaging
, HBS2.Net.Proto , HBS2.Net.Proto
, HBS2.Net.Proto.Actors.BlockInfo
, HBS2.Prelude , HBS2.Prelude
, HBS2.Prelude.Plated , HBS2.Prelude.Plated
, HBS2.Storage , HBS2.Storage
, HBS2.Net.Proto.Actors.BlockInfo
-- other-modules: -- other-modules:

View File

@ -0,0 +1,22 @@
{-# Language FunctionalDependencies #-}
module HBS2.Net.Messaging where
import Control.Monad.IO.Class
import Data.Kind
import Prettyprinter
newtype From a = From a
deriving newtype (Eq,Show,Pretty)
newtype To a = To a
deriving newtype (Eq,Show,Pretty)
class Messaging bus addr msg | bus -> addr, bus -> msg where
sendTo :: MonadIO m => bus -> To addr -> From addr -> msg -> m ()
receive :: MonadIO m => bus -> To addr -> m [msg]

View File

@ -1,3 +1,10 @@
module HBS2.Net.Proto.Actors.BlockInfo where module HBS2.Net.Proto.Actors.BlockInfo where
-- needs: logger
-- needs: reader and shit
-- needs: messaging
newtype BlockInfo = BlockInfo ()