Safe Haskell | None |
---|---|
Language | Haskell2010 |
Builders for JNumber
Synopsis
- jNumberBuilder :: Monoid b => Builder t b -> JNumber -> b
Documentation
jNumberBuilder :: Monoid b => Builder t b -> JNumber -> b Source #
Printing of JNumbers
>>>
toLazyText $ jNumberBuilder textBuilder (JNumber {_minus = False, _numberint = JIntInt D.DecDigit3 [], _frac = Just (Frac (D.DecDigit4 :| [D.DecDigit5])), _expn = Just (Exp {_ex = Ee, _minusplus = Just False, _expdigits = D.DecDigit1 :| [D.DecDigit0]})})
"3.45e+10"
>>>
toLazyText $ jNumberBuilder textBuilder (JNumber {_minus = True, _numberint = JIntInt D.DecDigit3 [], _frac = Just (Frac (D.DecDigit4 :| [D.DecDigit5])), _expn = Just (Exp {_ex = Ee, _minusplus = Just True, _expdigits = D.DecDigit0 :| [D.x2]})})
"-3.45e-02"
>>>
toLazyText $ jNumberBuilder textBuilder (JNumber {_minus = False, _numberint = JIntInt D.DecDigit0 [D.DecDigit0], _frac = Nothing, _expn = Nothing})
"00"