module Network.Ethereum.Web3.Encoding.Tuple (Singleton(..)) where
import Network.Ethereum.Web3.Encoding.Internal
import Network.Ethereum.Web3.Encoding.TupleTH
import Network.Ethereum.Web3.Encoding
newtype Singleton a = Singleton { unSingleton :: a }
instance (EncodingType a, ABIEncoding a) => ABIEncoding (Singleton a) where
toDataBuilder = _serialize (1, []) . unSingleton
fromDataParser = Singleton <$> (withParser sParser >>= dParser)
where withParser f = f undefined
$(mkTupleInst 2)
$(mkTupleInst 3)
$(mkTupleInst 4)
$(mkTupleInst 5)
$(mkTupleInst 6)
$(mkTupleInst 7)
$(mkTupleInst 8)
$(mkTupleInst 9)
$(mkTupleInst 10)
$(mkTupleInst 11)
$(mkTupleInst 12)
$(mkTupleInst 13)
$(mkTupleInst 14)
$(mkTupleInst 15)