add a Show instance for AmountDisplayOpts, WideBuilder
For debug logging.
This commit is contained in:
parent
28fd7c65f2
commit
0f4e462ae7
@ -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
|
||||||
|
|||||||
@ -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)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user