module Cardano.Tools.DBSynthesizer.Types (module Cardano.Tools.DBSynthesizer.Types) where

import Data.Word (Word64)
import Ouroboros.Consensus.Block.Abstract (SlotNo)

data ForgeLimit
  = ForgeLimitBlock !Word64
  | ForgeLimitSlot !SlotNo
  | ForgeLimitEpoch !Word64
  deriving (ForgeLimit -> ForgeLimit -> Bool
(ForgeLimit -> ForgeLimit -> Bool)
-> (ForgeLimit -> ForgeLimit -> Bool) -> Eq ForgeLimit
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ForgeLimit -> ForgeLimit -> Bool
== :: ForgeLimit -> ForgeLimit -> Bool
$c/= :: ForgeLimit -> ForgeLimit -> Bool
/= :: ForgeLimit -> ForgeLimit -> Bool
Eq, Int -> ForgeLimit -> ShowS
[ForgeLimit] -> ShowS
ForgeLimit -> String
(Int -> ForgeLimit -> ShowS)
-> (ForgeLimit -> String)
-> ([ForgeLimit] -> ShowS)
-> Show ForgeLimit
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ForgeLimit -> ShowS
showsPrec :: Int -> ForgeLimit -> ShowS
$cshow :: ForgeLimit -> String
show :: ForgeLimit -> String
$cshowList :: [ForgeLimit] -> ShowS
showList :: [ForgeLimit] -> ShowS
Show)

newtype ForgeResult = ForgeResult {ForgeResult -> Int
resultForged :: Int}
  deriving (ForgeResult -> ForgeResult -> Bool
(ForgeResult -> ForgeResult -> Bool)
-> (ForgeResult -> ForgeResult -> Bool) -> Eq ForgeResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ForgeResult -> ForgeResult -> Bool
== :: ForgeResult -> ForgeResult -> Bool
$c/= :: ForgeResult -> ForgeResult -> Bool
/= :: ForgeResult -> ForgeResult -> Bool
Eq, Int -> ForgeResult -> ShowS
[ForgeResult] -> ShowS
ForgeResult -> String
(Int -> ForgeResult -> ShowS)
-> (ForgeResult -> String)
-> ([ForgeResult] -> ShowS)
-> Show ForgeResult
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ForgeResult -> ShowS
showsPrec :: Int -> ForgeResult -> ShowS
$cshow :: ForgeResult -> String
show :: ForgeResult -> String
$cshowList :: [ForgeResult] -> ShowS
showList :: [ForgeResult] -> ShowS
Show)

data DBSynthesizerOpenMode
  = OpenCreate
  | OpenCreateForce
  | OpenAppend
  deriving (DBSynthesizerOpenMode -> DBSynthesizerOpenMode -> Bool
(DBSynthesizerOpenMode -> DBSynthesizerOpenMode -> Bool)
-> (DBSynthesizerOpenMode -> DBSynthesizerOpenMode -> Bool)
-> Eq DBSynthesizerOpenMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DBSynthesizerOpenMode -> DBSynthesizerOpenMode -> Bool
== :: DBSynthesizerOpenMode -> DBSynthesizerOpenMode -> Bool
$c/= :: DBSynthesizerOpenMode -> DBSynthesizerOpenMode -> Bool
/= :: DBSynthesizerOpenMode -> DBSynthesizerOpenMode -> Bool
Eq, Int -> DBSynthesizerOpenMode -> ShowS
[DBSynthesizerOpenMode] -> ShowS
DBSynthesizerOpenMode -> String
(Int -> DBSynthesizerOpenMode -> ShowS)
-> (DBSynthesizerOpenMode -> String)
-> ([DBSynthesizerOpenMode] -> ShowS)
-> Show DBSynthesizerOpenMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DBSynthesizerOpenMode -> ShowS
showsPrec :: Int -> DBSynthesizerOpenMode -> ShowS
$cshow :: DBSynthesizerOpenMode -> String
show :: DBSynthesizerOpenMode -> String
$cshowList :: [DBSynthesizerOpenMode] -> ShowS
showList :: [DBSynthesizerOpenMode] -> ShowS
Show)

data DBSynthesizerOptions = DBSynthesizerOptions
  { DBSynthesizerOptions -> ForgeLimit
synthLimit :: !ForgeLimit
  , DBSynthesizerOptions -> DBSynthesizerOpenMode
synthOpenMode :: !DBSynthesizerOpenMode
  }
  deriving Int -> DBSynthesizerOptions -> ShowS
[DBSynthesizerOptions] -> ShowS
DBSynthesizerOptions -> String
(Int -> DBSynthesizerOptions -> ShowS)
-> (DBSynthesizerOptions -> String)
-> ([DBSynthesizerOptions] -> ShowS)
-> Show DBSynthesizerOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DBSynthesizerOptions -> ShowS
showsPrec :: Int -> DBSynthesizerOptions -> ShowS
$cshow :: DBSynthesizerOptions -> String
show :: DBSynthesizerOptions -> String
$cshowList :: [DBSynthesizerOptions] -> ShowS
showList :: [DBSynthesizerOptions] -> ShowS
Show