From 8e0340197ca16c40725a5900e08142f5515e8328 Mon Sep 17 00:00:00 2001 From: Dmitry Zuikov Date: Mon, 16 Jan 2023 22:13:29 +0300 Subject: [PATCH] fix compile --- hbs2-core/hbs2-core.cabal | 2 +- hbs2-core/test/HasProtocol.hs | 3 ++- hbs2-core/test/Main.hs | 2 -- hbs2-core/test/TestUniqProtoId.hs | 4 ++++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hbs2-core/hbs2-core.cabal b/hbs2-core/hbs2-core.cabal index ffabf46c..69e4d9e2 100644 --- a/hbs2-core/hbs2-core.cabal +++ b/hbs2-core/hbs2-core.cabal @@ -119,7 +119,6 @@ test-suite test other-modules: TestFakeMessaging , TestActors , TestBlockInfoActor - , TestAbstractDispatch , TestUniqProtoId , FakeMessaging , HasProtocol @@ -149,6 +148,7 @@ test-suite test , transformers , uniplate , vector + , simple-logger diff --git a/hbs2-core/test/HasProtocol.hs b/hbs2-core/test/HasProtocol.hs index 104808f3..0d5659f9 100644 --- a/hbs2-core/test/HasProtocol.hs +++ b/hbs2-core/test/HasProtocol.hs @@ -5,11 +5,12 @@ module HasProtocol where import Data.Kind import Data.Proxy import GHC.TypeLits +import Data.Hashable -- e -> Transport (like, UDP or TChan) -- p -> L4 Protocol (like Ping/Pong) -class HasPeer e where +class (Hashable (Peer e), Eq (Peer e)) =>HasPeer e where data family (Peer e) :: Type class (KnownNat (ProtocolId p), HasPeer e) => HasProtocol e p | p -> e where diff --git a/hbs2-core/test/Main.hs b/hbs2-core/test/Main.hs index f81b3b39..626f601f 100644 --- a/hbs2-core/test/Main.hs +++ b/hbs2-core/test/Main.hs @@ -3,7 +3,6 @@ module Main where import TestFakeMessaging import TestActors import TestBlockInfoActor -import TestAbstractDispatch import Test.Tasty import Test.Tasty.HUnit @@ -16,7 +15,6 @@ main = testCase "testFakeMessaging1" testFakeMessaging1 , testCase "testActorsBasic" testActorsBasic , testCase "testBlockInfoActor" testBlockInfoActor - , testCase "testAbstractDispatch" testAbstractDispatch ] diff --git a/hbs2-core/test/TestUniqProtoId.hs b/hbs2-core/test/TestUniqProtoId.hs index 85bf1c8c..2bc78e50 100644 --- a/hbs2-core/test/TestUniqProtoId.hs +++ b/hbs2-core/test/TestUniqProtoId.hs @@ -28,6 +28,8 @@ import Data.List qualified as List import Data.Maybe import Safe +import Control.Logger.Simple qualified as Log + import Prettyprinter hiding (pipe) newtype From a = From (Peer a) @@ -213,6 +215,8 @@ peekPokeHandler = testUniqiProtoId :: IO () testUniqiProtoId = do + -- setLogLevel + fake <- newFakeP2P True let peer0 = FakePeer 0