{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE PolyKinds         #-}

module Ouroboros.Network.Util.ShowProxy
  ( ShowProxy (..)
  , Proxy (..)
  ) where

import Cardano.Slotting.Slot (SlotNo)
import Data.Typeable

class ShowProxy p where
    showProxy :: Proxy p -> String

    default showProxy :: Typeable p => Proxy p -> String
    showProxy Proxy p
p = TypeRep -> ShowS
showsTypeRep (Proxy p -> TypeRep
forall {k} (proxy :: k -> *) (a :: k).
Typeable a =>
proxy a -> TypeRep
typeRep Proxy p
p) String
""

instance ShowProxy Int where
instance ShowProxy SlotNo where