{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Ouroboros.Consensus.Protocol.Translate (TranslateProto (..)) where
import Ouroboros.Consensus.Protocol.Abstract
import Ouroboros.Consensus.Ticked (Ticked)
class TranslateProto protoFrom protoTo
where
translateConsensusConfig ::
ConsensusConfig protoFrom -> ConsensusConfig protoTo
translateTickedLedgerView ::
Ticked (LedgerView protoFrom) -> Ticked (LedgerView protoTo)
translateChainDepState ::
ChainDepState protoFrom -> ChainDepState protoTo
instance TranslateProto singleProto singleProto
where
translateConsensusConfig :: ConsensusConfig singleProto -> ConsensusConfig singleProto
translateConsensusConfig = ConsensusConfig singleProto -> ConsensusConfig singleProto
forall a. a -> a
id
translateTickedLedgerView :: Ticked (LedgerView singleProto) -> Ticked (LedgerView singleProto)
translateTickedLedgerView = Ticked (LedgerView singleProto) -> Ticked (LedgerView singleProto)
forall a. a -> a
id
translateChainDepState :: ChainDepState singleProto -> ChainDepState singleProto
translateChainDepState = ChainDepState singleProto -> ChainDepState singleProto
forall a. a -> a
id