add a Show instance for AmountDisplayOpts, WideBuilder

For debug logging.
This commit is contained in:
Simon Michael 2021-04-13 12:07:38 -10:00
parent 28fd7c65f2
commit 0f4e462ae7
2 changed files with 2 additions and 2 deletions

View File

@ -878,7 +878,7 @@ data AmountDisplay = AmountDisplay
{ adBuilder :: !WideBuilder -- ^ String representation of the Amount { adBuilder :: !WideBuilder -- ^ String representation of the Amount
, adTotal :: !Int -- ^ Cumulative length of MixedAmount this Amount is part of, , adTotal :: !Int -- ^ Cumulative length of MixedAmount this Amount is part of,
-- including separators -- including separators
} } deriving (Show)
nullAmountDisplay :: AmountDisplay nullAmountDisplay :: AmountDisplay
nullAmountDisplay = AmountDisplay mempty 0 nullAmountDisplay = AmountDisplay mempty 0

View File

@ -26,7 +26,7 @@ import qualified Data.Text.Lazy.Builder as TB
data WideBuilder = WideBuilder data WideBuilder = WideBuilder
{ wbBuilder :: !TB.Builder { wbBuilder :: !TB.Builder
, wbWidth :: !Int , wbWidth :: !Int
} } deriving (Show)
instance Semigroup WideBuilder where instance Semigroup WideBuilder where
WideBuilder x i <> WideBuilder y j = WideBuilder (x <> y) (i + j) WideBuilder x i <> WideBuilder y j = WideBuilder (x <> y) (i + j)