Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
CSV serialization of BNB Staking Rewards.
Synopsis
- makeCsvContents :: [Reward] -> IO ByteString
- data ExportData = ExportData {}
- convertReward :: Reward -> IO ExportData
- newtype MyZonedTime = MyZonedTime {}
Documentation
makeCsvContents :: [Reward] -> IO ByteString Source #
Build the CSV contents for the given rewards, including the header row.
data ExportData Source #
Datatype representing a single row in the CSV export.
ExportData | |
|
Instances
convertReward :: Reward -> IO ExportData Source #
Render a Reward
into our target export data by converting to
localtime(respecting DST), & formatting the amount column to 8 decimal
places.
newtype MyZonedTime Source #
Wrapper type to support custom ToField
instance.
Instances
Read MyZonedTime Source # | |
Defined in Console.BnbStaking.Csv readsPrec :: Int -> ReadS MyZonedTime # readList :: ReadS [MyZonedTime] # readPrec :: ReadPrec MyZonedTime # readListPrec :: ReadPrec [MyZonedTime] # | |
Show MyZonedTime Source # | |
Defined in Console.BnbStaking.Csv showsPrec :: Int -> MyZonedTime -> ShowS # show :: MyZonedTime -> String # showList :: [MyZonedTime] -> ShowS # | |
ToField MyZonedTime Source # | Render with |
Defined in Console.BnbStaking.Csv toField :: MyZonedTime -> Field # |