{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -Wno-orphans #-}
module Test.Ouroboros.Storage.Orphans () where
import Data.Maybe (isJust)
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.Storage.ChainDB.API (ChainDbError,
ChainDbFailure)
import qualified Ouroboros.Consensus.Storage.ChainDB.API as ChainDB
import Ouroboros.Consensus.Storage.ImmutableDB.API (ImmutableDBError)
import qualified Ouroboros.Consensus.Storage.ImmutableDB.API as ImmutableDB
import Ouroboros.Consensus.Storage.VolatileDB.API (VolatileDBError)
import qualified Ouroboros.Consensus.Storage.VolatileDB.API as VolatileDB
import Ouroboros.Consensus.Util.CallStack
import System.FS.API.Types (FsError, sameFsError)
instance Eq PrettyCallStack where
PrettyCallStack
_ == :: PrettyCallStack -> PrettyCallStack -> Bool
== PrettyCallStack
_ = Bool
True
instance Eq FsError where
== :: FsError -> FsError -> Bool
(==) = FsError -> FsError -> Bool
sameFsError
instance Eq VolatileDB.ApiMisuse where
VolatileDB.ClosedDBError Maybe SomeException
mbEx1 == :: ApiMisuse -> ApiMisuse -> Bool
== VolatileDB.ClosedDBError Maybe SomeException
mbEx2 =
Maybe SomeException -> Bool
forall a. Maybe a -> Bool
isJust Maybe SomeException
mbEx1 Bool -> Bool -> Bool
forall a. Eq a => a -> a -> Bool
== Maybe SomeException -> Bool
forall a. Maybe a -> Bool
isJust Maybe SomeException
mbEx2
deriving instance StandardHash blk => Eq (VolatileDB.UnexpectedFailure blk)
deriving instance StandardHash blk => Eq (VolatileDBError blk)
deriving instance StandardHash blk => Eq (ImmutableDBError blk)
deriving instance StandardHash blk => Eq (ImmutableDB.ApiMisuse blk)
deriving instance StandardHash blk => Eq (ImmutableDB.UnexpectedFailure blk)
deriving instance (StandardHash blk) => Eq (ChainDbFailure blk)
deriving instance (StandardHash blk) => Eq (ChainDbError blk)