remote: move ourProtoVersion near type, elaborate Types imports in Client

This commit is contained in:
sorki 2023-12-01 06:15:47 +01:00
parent ec79cfe1ce
commit e57397b99f
2 changed files with 12 additions and 7 deletions

View File

@ -24,13 +24,10 @@ import System.Nix.Store.Remote.Logger (processOutput)
import System.Nix.Store.Remote.MonadStore
import System.Nix.Store.Remote.Socket (sockPutS, sockGetS)
import System.Nix.Store.Remote.Serializer (bool, enum, int, protoVersion, text)
import System.Nix.Store.Remote.Types
ourProtoVersion :: ProtoVersion
ourProtoVersion = ProtoVersion
{ protoVersion_major = 1
, protoVersion_minor = 21
}
import System.Nix.Store.Remote.Types.Logger (Logger)
import System.Nix.Store.Remote.Types.ProtoVersion (ProtoVersion(..), ourProtoVersion)
import System.Nix.Store.Remote.Types.StoreConfig (PreStoreConfig(..), StoreConfig(..))
import System.Nix.Store.Remote.Types.WorkerOp (WorkerOp)
workerMagic1 :: Int
workerMagic1 = 0x6e697863

View File

@ -1,6 +1,7 @@
module System.Nix.Store.Remote.Types.ProtoVersion
( ProtoVersion(..)
, HasProtoVersion(..)
, ourProtoVersion
) where
import Data.Word (Word8, Word16)
@ -17,3 +18,10 @@ class HasProtoVersion r where
instance HasProtoVersion ProtoVersion where
hasProtoVersion = id
-- | The protocol version we support
ourProtoVersion :: ProtoVersion
ourProtoVersion = ProtoVersion
{ protoVersion_major = 1
, protoVersion_minor = 21
}