From 929ecc3f53937695bab6f113696968c7712bcd78 Mon Sep 17 00:00:00 2001 From: Georgy Lukyanov Date: Thu, 14 Sep 2023 12:58:04 +0200 Subject: [PATCH] Pull-out `Depth` into its own `Kore.JsonRpc.Types.Depth` module --- kore-rpc-types/kore-rpc-types.cabal | 1 + kore-rpc-types/src/Kore/JsonRpc/Types.hs | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kore-rpc-types/kore-rpc-types.cabal b/kore-rpc-types/kore-rpc-types.cabal index b5e0b776f29..c23055ed012 100644 --- a/kore-rpc-types/kore-rpc-types.cabal +++ b/kore-rpc-types/kore-rpc-types.cabal @@ -84,6 +84,7 @@ library Kore.JsonRpc.Error Kore.JsonRpc.Types Kore.JsonRpc.Types.Log + Kore.JsonRpc.Types.Depth Kore.JsonRpc.Server Kore.Syntax.Json.Types hs-source-dirs: diff --git a/kore-rpc-types/src/Kore/JsonRpc/Types.hs b/kore-rpc-types/src/Kore/JsonRpc/Types.hs index e39f9ad6767..499eb6317b3 100644 --- a/kore-rpc-types/src/Kore/JsonRpc/Types.hs +++ b/kore-rpc-types/src/Kore/JsonRpc/Types.hs @@ -4,6 +4,7 @@ License : BSD-3-Clause -} module Kore.JsonRpc.Types ( module Kore.JsonRpc.Types, + module Kore.JsonRpc.Types.Depth, ) where import Control.Exception (Exception) @@ -19,18 +20,14 @@ import Deriving.Aeson ( StripPrefix, ) import GHC.Generics (Generic) +import Kore.JsonRpc.Types.Depth (Depth (..)) import Kore.JsonRpc.Types.Log (LogEntry) import Kore.Syntax.Json.Types (KoreJson) import Network.JSONRPC ( FromRequest (..), ) -import Numeric.Natural import Prettyprinter qualified as Pretty -newtype Depth = Depth {getNat :: Natural} - deriving stock (Show, Eq) - deriving newtype (FromJSON, ToJSON, Num) - data ExecuteRequest = ExecuteRequest { state :: !KoreJson , maxDepth :: !(Maybe Depth)