- reprPrec : α → Nat → Lean.Format
Instances
- Lean.instReprDeclarationRanges
- Lean.instReprRat
- Lean.instReprDataValue
- Lean.Meta.Match.instReprMatchEqns
- IO.FS.instReprMetadata
- Lean.Meta.Linear.instReprJustification
- instReprUInt32
- Lean.instReprPosition
- Lean.Meta.Simp.instReprConfig
- Lean.instReprFVarId
- instReprUInt8
- instReprSubstring
- instReprStdGen
- Lean.Parser.instReprLeadingIdentBehavior
- IO.FS.instReprFileType
- Lean.instReprStructureFieldInfo
- instReprSigma
- Lean.Meta.DiscrTree.instReprKey
- Lean.Meta.instReprSimpCongrTheorems
- Lean.Meta.Linear.instReprCnstr
- Lean.JsonNumber.instReprJsonNumber
- Lean.Lsp.instReprCompletionItemKind
- Lean.instReprDefinitionSafety
- instReprSourceInfo
- instReprSSet
- EStateM.instReprResult
- Lean.IR.UnreachableBranches.instReprValue
- Lean.Meta.Linear.instReprPoly
- instReprId
- instReprDecidable
- instReprSubtype
- IO.FS.instReprSystemTime
- Lean.instReprKVMap
- instReprPUnit
- instReprUnit
- Lean.instReprData
- instReprOption
- Unicode.instReprGeneralCategory
- Lean.instReprBinderInfo
- String.instReprRange
- Lean.Name.instReprSyntax
- Lean.Meta.Linear.instReprCnstrKind
- Lean.Meta.instReprCustomEliminator
- Lean.Meta.instReprElimInfo
- instReprUInt64
- IO.FS.instReprDirEntry
- Lean.instReprData_1
- Lean.Meta.Linear.Nat.instReprExpr
- Lean.instReprExpr
- Lean.Meta.instReprEtaStructMode
- instReprUInt16
- Lean.Elab.Command.instReprStructFieldKind
- Lean.Meta.Linear.Nat.instReprExprCnstr
- Lean.Meta.DSimp.instReprConfig
- Lean.Meta.Linear.instReprVar
- Lean.Data.AC.instReprExpr
- Std.RBTree.instReprRBTree
- Lean.Parsec.instReprParseResult
- instReprIterator
- instReprList
- instReprList_1
- Lean.Widget.instReprTaggedText
- instReprSubarray
- Lean.Lsp.instReprLineRange
- Lean.instReprMetavarKind
- Lean.Meta.instReprSimpCongrTheorem
- instReprSum
- Lean.Meta.Linear.Nat.instReprPolyCnstr
- instReprFloat
- instReprNat
- Lean.Meta.instReprTransparencyMode
- Lean.Elab.Command.instReprStructFieldInfo
- Lean.Meta.Linear.instReprAssumptionId
- Array.instReprArray
- Lean.Meta.instReprElimAltInfo
- Lean.instReprMVarId
- Lean.instReprMVarId_1
- Lean.IR.instReprCtorInfo
- instReprProd
- Lean.instReprReducibilityStatus
- Lean.instReprDeclarationRange
- System.instReprFilePath
- Lean.Meta.instReprCustomEliminators
- instReprULift
- instReprBool
- Lean.instReprHeadIndex
- instReprIdType
- instReprExcept
- instReprPos
- Lean.Name.instReprName
- Lean.instReprLiteral
- instReprString
- instReprUSize
- Lean.instReprSMap
- Std.RBMap.instReprRBMap
- instReprChar
- instReprFin
- Lean.instReprLevel
- instReprInt
Equations
- instReprIdType = inferInstanceAs (Repr α)
Equations
- instReprId = inferInstanceAs (Repr α)
Equations
- instReprBool = { reprPrec := fun x x_1 => match x, x_1 with | true, x => Std.Format.text "true" | false, x => Std.Format.text "false" }
Equations
- Repr.addAppParen f prec = if prec ≥ 1024 then Lean.Format.paren f else f
Equations
- One or more equations did not get rendered due to their size.
Equations
- instReprPUnit = { reprPrec := fun x x => Std.Format.text "PUnit.unit" }
Equations
- instReprULift = { reprPrec := fun v prec => Repr.addAppParen (Std.Format.text "ULift.up " ++ reprArg v.down) prec }
Equations
- instReprUnit = { reprPrec := fun x x => Std.Format.text "()" }
Equations
- One or more equations did not get rendered due to their size.
- reprTuple : α → List Lean.Format → List Lean.Format
Instances
Equations
- One or more equations did not get rendered due to their size.
Equations
- Nat.toDigits base n = Nat.toDigitsCore base (n + 1) n []
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
Equations
- instReprNat = { reprPrec := fun n x => Std.Format.text (Nat.repr n) }
Equations
- instReprInt = { reprPrec := fun i x => Std.Format.text (Int.repr i) }
Equations
Equations
- charToHex c = let n := Char.toNat c; let d2 := n / 16; let d1 := n % 16; hexDigitRepr d2 ++ hexDigitRepr d1
Equations
- One or more equations did not get rendered due to their size.
Equations
- Char.quote c = "'" ++ Char.quoteCore c ++ "'"
Equations
- instReprChar = { reprPrec := fun c x => Std.Format.text (Char.quote c) }
Equations
- String.quote s = if String.isEmpty s = true then "\"\"" else String.foldl (fun s c => s ++ Char.quoteCore c) "\"" s ++ "\""
Equations
- instReprString = { reprPrec := fun s x => Std.Format.text (String.quote s) }
Equations
- instReprPos = { reprPrec := fun p x => Std.Format.text "{ byteIdx := " ++ repr p.byteIdx ++ Std.Format.text " }" }
Equations
- instReprSubstring = { reprPrec := fun s x => Std.Format.text (String.quote (Substring.toString s) ++ ".toSubstring") }
Equations
- One or more equations did not get rendered due to their size.
Equations
- instReprFin n = { reprPrec := fun f x => repr f.val }
Equations
- instReprUInt8 = { reprPrec := fun n x => repr (UInt8.toNat n) }
Equations
- instReprUInt16 = { reprPrec := fun n x => repr (UInt16.toNat n) }
Equations
- instReprUInt32 = { reprPrec := fun n x => repr (UInt32.toNat n) }
Equations
- instReprUInt64 = { reprPrec := fun n x => repr (UInt64.toNat n) }
Equations
- instReprUSize = { reprPrec := fun n x => repr (USize.toNat n) }
Equations
- One or more equations did not get rendered due to their size.
Equations
- instReprSourceInfo = { reprPrec := [anonymous] }