mirror of https://github.com/voidlizard/hbs2
wip
This commit is contained in:
parent
cda69cacce
commit
7ba2eacdbc
|
@ -63,17 +63,18 @@ library
|
|||
import: shared-properties
|
||||
|
||||
exposed-modules:
|
||||
, HBS2.Defaults
|
||||
, HBS2.Clock
|
||||
HBS2.Clock
|
||||
, HBS2.Data.Types
|
||||
, HBS2.Data.Types.Refs
|
||||
, HBS2.Defaults
|
||||
, HBS2.Hash
|
||||
, HBS2.Merkle
|
||||
, HBS2.Net.Messaging
|
||||
, HBS2.Net.Proto
|
||||
, HBS2.Net.Proto.Actors.BlockInfo
|
||||
, HBS2.Prelude
|
||||
, HBS2.Prelude.Plated
|
||||
, HBS2.Storage
|
||||
, HBS2.Net.Proto.Actors.BlockInfo
|
||||
|
||||
|
||||
-- other-modules:
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,3 +1,10 @@
|
|||
module HBS2.Net.Proto.Actors.BlockInfo where
|
||||
|
||||
-- needs: logger
|
||||
-- needs: reader and shit
|
||||
-- needs: messaging
|
||||
newtype BlockInfo = BlockInfo ()
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue