mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2024-11-27 18:45:57 +03:00
remote: move ourProtoVersion near type, elaborate Types imports in Client
This commit is contained in:
parent
ec79cfe1ce
commit
e57397b99f
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user