{-# LANGUAGE DataKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wno-orphans #-} module Cardano.Ledger.Mary.Rules.Delegs () where import Cardano.Ledger.Core import Cardano.Ledger.Mary.Era (MaryEra) import Cardano.Ledger.Mary.Rules.Delpl () import Cardano.Ledger.Shelley.Rules ( ShelleyDelegPredFailure, ShelleyDelegsPredFailure (..), ShelleyDelplPredFailure, ShelleyPoolPredFailure, ) type instance EraRuleFailure "DELEGS" (MaryEra c) = ShelleyDelegsPredFailure (MaryEra c) instance InjectRuleFailure "DELEGS" ShelleyDelegsPredFailure (MaryEra c) instance InjectRuleFailure "DELEGS" ShelleyDelplPredFailure (MaryEra c) where injectFailure :: ShelleyDelplPredFailure (MaryEra c) -> EraRuleFailure "DELEGS" (MaryEra c) injectFailure = forall era. PredicateFailure (EraRule "DELPL" era) -> ShelleyDelegsPredFailure era DelplFailure instance InjectRuleFailure "DELEGS" ShelleyPoolPredFailure (MaryEra c) where injectFailure :: ShelleyPoolPredFailure (MaryEra c) -> EraRuleFailure "DELEGS" (MaryEra c) injectFailure = forall era. PredicateFailure (EraRule "DELPL" era) -> ShelleyDelegsPredFailure era DelplFailure forall b c a. (b -> c) -> (a -> b) -> a -> c . forall (rule :: Symbol) (t :: * -> *) era. InjectRuleFailure rule t era => t era -> EraRuleFailure rule era injectFailure instance InjectRuleFailure "DELEGS" ShelleyDelegPredFailure (MaryEra c) where injectFailure :: ShelleyDelegPredFailure (MaryEra c) -> EraRuleFailure "DELEGS" (MaryEra c) injectFailure = forall era. PredicateFailure (EraRule "DELPL" era) -> ShelleyDelegsPredFailure era DelplFailure forall b c a. (b -> c) -> (a -> b) -> a -> c . forall (rule :: Symbol) (t :: * -> *) era. InjectRuleFailure rule t era => t era -> EraRuleFailure rule era injectFailure