{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Network.Ethereum.ABI.Prim.Tagged (
Tagged
) where
import Data.Proxy (Proxy (..))
import Data.Tagged (Tagged (..))
import Generics.SOP (Generic)
import Network.Ethereum.ABI.Class (ABIGet (..), ABIPut (..),
ABIType (..))
instance ABIType a => ABIType (Tagged t a) where
isDynamic _ = isDynamic (Proxy :: Proxy a)
instance ABIPut a => ABIPut (Tagged t a) where
abiPut (Tagged a) = abiPut a
instance ABIGet a => ABIGet (Tagged t a) where
abiGet = Tagged <$> abiGet
instance Generic a => Generic (Tagged t a)