add show instances for core types

Summary: add show instances for core types

Reviewed By: JonCoens

Differential Revision: D3613250

fbshipit-source-id: aa3bacdbb938666352859078ccf93fc24f3e8652
This commit is contained in:
Kubo Kovac 2016-07-25 15:39:39 -07:00 committed by Facebook Github Bot 4
parent 3cc0b3e054
commit 10623dc6ee

View File

@ -155,7 +155,7 @@ type Round = Int
-- | Stats that we collect along the way. -- | Stats that we collect along the way.
newtype Stats = Stats [RoundStats] newtype Stats = Stats [RoundStats]
deriving ToJSON deriving (Show, ToJSON)
-- | Pretty-print Stats. -- | Pretty-print Stats.
ppStats :: Stats -> String ppStats :: Stats -> String
@ -183,6 +183,7 @@ data RoundStats
{ fetchReq :: String { fetchReq :: String
, fetchStack :: [String] , fetchStack :: [String]
} }
deriving (Show)
-- | Pretty-print RoundStats. -- | Pretty-print RoundStats.
ppRoundStats :: RoundStats -> String ppRoundStats :: RoundStats -> String
@ -209,7 +210,7 @@ data DataSourceRoundStats = DataSourceRoundStats
, dataSourceTime :: Maybe Microseconds , dataSourceTime :: Maybe Microseconds
, dataSourceFailures :: Maybe Int , dataSourceFailures :: Maybe Int
, dataSourceAllocation :: Maybe Int , dataSourceAllocation :: Maybe Int
} } deriving (Show)
-- | Pretty-print DataSourceRoundStats -- | Pretty-print DataSourceRoundStats
ppDataSourceRoundStats :: DataSourceRoundStats -> String ppDataSourceRoundStats :: DataSourceRoundStats -> String