Documentation
Init
.
Data
.
Int
.
Repr
Search
return to top
source
Imports
Init.Data.Repr
Init.Data.String.Defs
Imported by
Int
.
repr
Int
.
instRepr
source
def
Int
.
repr
:
Int
→
String
Returns the decimal string representation of an integer.
Equations
(
Int.ofNat
m
)
.
repr
=
m
.
repr
(
Int.negSucc
m
)
.
repr
=
"-"
++
m
.
succ
.
repr
Instances For
source
@[implicit_reducible]
instance
Int
.
instRepr
:
Repr
Int
Equations
Int.instRepr
=
{
reprPrec
:=
fun (
i
:
Int
) (
prec
:
Nat
) =>
if
i
<
0
then
Repr.addAppParen
(
Std.Format.text
i
.
repr
)
prec
else
Std.Format.text
i
.
repr
}