-------------------------------------------------------------------------------
formatDecimal ::
  RealFloat a =>
  -- | Digits after the point
  Int ->
  -- | Add thousands sep?
  Bool ->
  -- | Number
  a ->
  Text
formatDecimal n th i =
  let res = T.pack . showFFloat (Just n) i $ ""
   in if th then addThousands res else res
formatDecimal ::
  RealFloat a =>
  -- | Digits after the point
  Int ->
  -- | Add thousands sep?
  Bool ->
  -- | Number
  a ->
  Text
formatDecimal n th i =
  let res = T.pack . showFFloat (Just n) i $ ""
   in if th then addThousands res else res
formatDecimal n th i =
  let res = T.pack . showFFloat (Just n) i $ ""
   in if th then addThousands res else res