mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2025-01-06 03:06:58 +03:00
remote: add Types.Verbosity
This commit is contained in:
parent
64a4368dfd
commit
96cbe1178d
@ -75,6 +75,7 @@ library
|
||||
, System.Nix.Store.Remote.Types.ProtoVersion
|
||||
, System.Nix.Store.Remote.Types.StoreConfig
|
||||
, System.Nix.Store.Remote.Types.SubstituteMode
|
||||
, System.Nix.Store.Remote.Types.Verbosity
|
||||
, System.Nix.Store.Remote.Types.WorkerOp
|
||||
|
||||
build-depends:
|
||||
|
@ -20,6 +20,7 @@ import System.Nix.Derivation (Derivation(..), DerivationOutput(..))
|
||||
import System.Nix.Build (BuildMode(..), BuildStatus(..), BuildResult(..))
|
||||
import System.Nix.StorePath (StoreDir, StorePath)
|
||||
import System.Nix.Store.Remote.Serialize.Prim
|
||||
import System.Nix.Store.Remote.Types.Verbosity (Verbosity)
|
||||
|
||||
instance Serialize Text where
|
||||
get = getText
|
||||
@ -104,3 +105,7 @@ putDerivation storeDir Derivation{..} = do
|
||||
|
||||
flip putMany (Data.Map.toList env)
|
||||
$ \(a1, a2) -> putText a1 *> putText a2
|
||||
|
||||
instance Serialize Verbosity where
|
||||
get = getEnum
|
||||
put = putEnum
|
||||
|
@ -4,6 +4,7 @@ module System.Nix.Store.Remote.Types
|
||||
, module System.Nix.Store.Remote.Types.ProtoVersion
|
||||
, module System.Nix.Store.Remote.Types.StoreConfig
|
||||
, module System.Nix.Store.Remote.Types.SubstituteMode
|
||||
, module System.Nix.Store.Remote.Types.Verbosity
|
||||
, module System.Nix.Store.Remote.Types.WorkerOp
|
||||
) where
|
||||
|
||||
@ -12,4 +13,5 @@ import System.Nix.Store.Remote.Types.Logger
|
||||
import System.Nix.Store.Remote.Types.ProtoVersion
|
||||
import System.Nix.Store.Remote.Types.StoreConfig
|
||||
import System.Nix.Store.Remote.Types.SubstituteMode
|
||||
import System.Nix.Store.Remote.Types.Verbosity
|
||||
import System.Nix.Store.Remote.Types.WorkerOp
|
||||
|
@ -0,0 +1,17 @@
|
||||
module System.Nix.Store.Remote.Types.Verbosity
|
||||
( Verbosity(..)
|
||||
) where
|
||||
|
||||
import GHC.Generics
|
||||
|
||||
-- | Logging verbosity
|
||||
data Verbosity
|
||||
= Verbosity_Error
|
||||
| Verbosity_Warn
|
||||
| Verbosity_Notice
|
||||
| Verbosity_Info
|
||||
| Verbosity_Talkative
|
||||
| Verbosity_Chatty
|
||||
| Verbosity_Debug
|
||||
| Verbosity_Vomit
|
||||
deriving (Bounded, Eq, Enum, Generic, Ord, Show)
|
Loading…
Reference in New Issue
Block a user