A typeclass that specifies the standard way of turning values of some type into Format
.
When rendered this Format
should be as close as possible to something that can be parsed as the
input value.
- reprPrec : α → Nat → Std.Format
Turn a value of type
α
intoFormat
at a given precedence. The precedence value can be used to avoid parentheses if they are not necessary.
Instances
- AddUnits.instRepr
- Aesop.instReprGoalWithMVars
- Aesop.instReprOptions
- Aesop.instReprStrategy
- Array.instRepr
- Batteries.BinomialHeap.Imp.instReprHeap
- Batteries.BinomialHeap.Imp.instReprHeapNode
- Batteries.RBMap.instRepr
- Batteries.RBSet.instRepr
- Batteries.Tactic.Lint.instReprLintVerbosity
- Batteries.instReprRBColor
- Batteries.instReprRBNode
- BitVec.instRepr
- BitVec.instReprLiteral
- EStateM.instReprResult
- Fin.instReprValue
- IO.FS.instReprDirEntry
- IO.FS.instReprFileType
- IO.FS.instReprMetadata
- IO.FS.instReprSystemTime
- IO.instReprTaskState
- Int.Linear.instReprExpr_lean
- Int.Linear.instReprPoly_lean
- Lake.DRBMap.instReprOfSigma
- Lake.MTime.instRepr
- Lake.instReprBackend
- Lake.instReprBuildKey
- Lake.instReprBuildTrace
- Lake.instReprBuildType
- Lake.instReprCliError
- Lake.instReprDate
- Lake.instReprDependencySrc
- Lake.instReprElanInstall
- Lake.instReprGlob
- Lake.instReprHash
- Lake.instReprJobAction
- Lake.instReprLakeInstall
- Lake.instReprLeanConfig
- Lake.instReprLeanInstall
- Lake.instReprLeanOption
- Lake.instReprLogLevel
- Lake.instReprModuleDeps
- Lake.instReprModuleFacet
- Lake.instReprSemVerCore
- Lake.instReprStdVer
- Lake.instReprTarget
- Lake.instReprTarget_1
- Lake.instReprToolchainVer
- Lake.instReprVerbosity
- Lake.instReprWorkspaceConfig
- Lean.Compiler.LCNF.FloatLetIn.instReprDecision
- Lean.Compiler.LCNF.Simp.instReprFunDeclInfo
- Lean.Compiler.LCNF.UnreachableBranches.instReprValue
- Lean.Compiler.LCNF.instReprSpecParamInfo
- Lean.Compiler.LCNF.instReprTrivialStructureInfo
- Lean.Data.AC.instReprExpr
- Lean.Diff.instReprAction
- Lean.Elab.Command.instReprStructFieldInfo
- Lean.Elab.Command.instReprStructFieldKind
- Lean.Elab.Structural.instReprIndGroupInfo
- Lean.Elab.Structural.instReprIndGroupInst
- Lean.Elab.Structural.instReprRecArgInfo
- Lean.Elab.Tactic.RCases.instReprRCasesPatt
- Lean.Elab.Tactic.Simpa.instReprUseImplicitLambdaResult
- Lean.Elab.Term.Quotation.instReprMatchResult
- Lean.Elab.Term.instReprElabElimInfo
- Lean.Elab.Term.instReprPostponeBehavior
- Lean.Elab.WF.GuessLex.instReprGuessLexRel
- Lean.IR.UnreachableBranches.instReprValue
- Lean.IR.instReprCtorInfo
- Lean.IR.instReprIRType
- Lean.IR.instReprJoinPointId
- Lean.IR.instReprParam
- Lean.IR.instReprVarId
- Lean.JsonNumber.instRepr
- Lean.Lsp.instReprCompletionItemKind
- Lean.Lsp.instReprCompletionItemTag
- Lean.Lsp.instReprLineRange
- Lean.Lsp.instReprPosition
- Lean.Lsp.instReprRange
- Lean.Meta.DiscrTree.instReprKey
- Lean.Meta.Ext.instReprExtTheorem
- Lean.Meta.Grind.Canon.instReprShouldCanonResult
- Lean.Meta.Grind.instReprEMatchTheoremKind
- Lean.Meta.Grind.instReprENode
- Lean.Meta.Grind.instReprOrigin
- Lean.Meta.LazyDiscrTree.instReprKey
- Lean.Meta.Match.instReprMatchEqns
- Lean.Meta.NormCast.instReprLabel
- Lean.Meta.Simp.Arith.Nat.instReprExprCnstr_lean
- Lean.Meta.Simp.Arith.Nat.instReprExpr_lean
- Lean.Meta.Simp.Arith.Nat.instReprPolyCnstr_lean
- Lean.Meta.Simp.instReprSimpLetCase
- Lean.Meta.instReprCoeFnInfo
- Lean.Meta.instReprCoeFnType
- Lean.Meta.instReprConfig
- Lean.Meta.instReprConfig_1
- Lean.Meta.instReprConfig_2
- Lean.Meta.instReprCongrArgKind
- Lean.Meta.instReprCustomEliminator
- Lean.Meta.instReprCustomEliminators
- Lean.Meta.instReprElimAltInfo
- Lean.Meta.instReprElimInfo
- Lean.Meta.instReprEtaStructMode
- Lean.Meta.instReprFunIndInfo
- Lean.Meta.instReprFunIndParamKind
- Lean.Meta.instReprOrigin
- Lean.Meta.instReprProjReductionKind
- Lean.Meta.instReprSimpCongrTheorem
- Lean.Meta.instReprSimpCongrTheorems
- Lean.Meta.instReprTransparencyMode
- Lean.Name.instRepr
- Lean.Omega.instReprConstraint
- Lean.Omega.instReprLinearCombo
- Lean.Parser.instReprLeadingIdentBehavior
- Lean.Parser.instReprRecoveryContext
- Lean.RBMap.instRepr
- Lean.RBTree.instRepr
- Lean.Server.Test.Runner.Client.instReprHyp
- Lean.Server.Test.Runner.Client.instReprInteractiveGoal
- Lean.Server.Test.Runner.Client.instReprInteractiveGoals
- Lean.Server.Test.Runner.Client.instReprSubexprInfo
- Lean.SubExpr.Pos.instRepr
- Lean.Syntax.instRepr
- Lean.Syntax.instReprPreresolved
- Lean.Syntax.instReprTSyntax
- Lean.Widget.instReprTaggedText
- Lean.instReprBinderInfo
- Lean.instReprConstantKind
- Lean.instReprData
- Lean.instReprDataValue
- Lean.instReprData_1
- Lean.instReprDeclarationLocation
- Lean.instReprDeclarationRange
- Lean.instReprDeclarationRanges
- Lean.instReprDefinitionSafety
- Lean.instReprExpr
- Lean.instReprFVarId
- Lean.instReprHeadIndex
- Lean.instReprImport
- Lean.instReprKVMap
- Lean.instReprLMVarId
- Lean.instReprLeanOptionValue
- Lean.instReprLeanOptions
- Lean.instReprLevel
- Lean.instReprLevelMVarId
- Lean.instReprLiteral
- Lean.instReprLocalDeclKind
- Lean.instReprMVarId
- Lean.instReprMVarId_1
- Lean.instReprMetavarKind
- Lean.instReprPosition
- Lean.instReprProjectionFunctionInfo
- Lean.instReprReducibilityStatus
- Lean.instReprSMap
- Lean.instReprStructureFieldInfo
- Lean.instReprTransformStep
- LeanSearchClient.instReprLoogleMatch
- LeanSearchClient.instReprLoogleResult
- LeanSearchClient.instReprSearchResult
- Mathlib.Linter.Flexible.instReprStained
- Mathlib.Notation3.instReprDelabKey
- Mathlib.Tactic.GCongr.instReprGCongrLemma
- Plausible.NoShrink.repr
- Plausible.TotalFunction.instRepr
- Qq.instReprMaybeDefEq
- Qq.instReprMaybeLevelDefEq
- Qq.instReprQuoted
- Std.DHashMap.Raw.instRepr
- Std.DHashMap.instRepr
- Std.DTreeMap.Raw.instRepr
- Std.DTreeMap.instRepr
- Std.HashMap.Raw.instRepr
- Std.HashMap.instRepr
- Std.HashSet.Raw.instRepr
- Std.HashSet.instRepr
- Std.Internal.Parsec.instReprParseResult
- Std.Internal.instReprRat
- Std.Sat.AIG.instReprDecl
- Std.Tactic.BVDecide.LRAT.instReprAction
- Std.Tactic.BVDecide.instReprBVBit
- Std.Time.DateTime.instRepr
- Std.Time.Day.Ordinal.instReprOfYear
- Std.Time.Day.instOffsetRepr
- Std.Time.Day.instOrdinalRepr
- Std.Time.Hour.instOffsetRepr
- Std.Time.Hour.instOrdinalRepr
- Std.Time.Internal.Bounded.instRepr
- Std.Time.Internal.UnitVal.instRepr
- Std.Time.Millisecond.instOffsetRepr
- Std.Time.Millisecond.instOrdinalRepr
- Std.Time.Minute.instOffsetRepr
- Std.Time.Minute.instOrdinalRepr
- Std.Time.Month.instOffsetRepr
- Std.Time.Month.instOrdinalRepr
- Std.Time.Nanosecond.Ordinal.instOfDayRepr
- Std.Time.Nanosecond.instOffsetRepr
- Std.Time.Nanosecond.instOrdinalRepr
- Std.Time.Nanosecond.instSpanRepr
- Std.Time.PlainDate.instRepr
- Std.Time.PlainDateTime.instRepr
- Std.Time.PlainTime.instRepr
- Std.Time.Second.instOffsetRepr
- Std.Time.Second.instReprOrdinal
- Std.Time.TimeZone.TZif.instReprHeader
- Std.Time.TimeZone.TZif.instReprLeapSecond
- Std.Time.TimeZone.TZif.instReprLocalTimeType
- Std.Time.TimeZone.TZif.instReprTZif
- Std.Time.TimeZone.TZif.instReprTZifV1
- Std.Time.TimeZone.TZif.instReprTZifV2
- Std.Time.TimeZone.instReprLocalTimeType
- Std.Time.TimeZone.instReprOffset
- Std.Time.TimeZone.instReprStdWall
- Std.Time.TimeZone.instReprTransition
- Std.Time.TimeZone.instReprUTLocal
- Std.Time.TimeZone.instReprZoneRules
- Std.Time.Week.Ordinal.instOfMonthRepr
- Std.Time.Week.instOffsetRepr
- Std.Time.Week.instOrdinalRepr
- Std.Time.Year.instOffsetRepr
- Std.Time.Year.instReprEra
- Std.Time.ZonedDateTime.instRepr
- Std.Time.instReprDuration
- Std.Time.instReprDuration_1
- Std.Time.instReprFormatPart
- Std.Time.instReprFraction
- Std.Time.instReprGenericFormat
- Std.Time.instReprHourMarker
- Std.Time.instReprModifier
- Std.Time.instReprNumber
- Std.Time.instReprOffsetO
- Std.Time.instReprOffsetX
- Std.Time.instReprOffsetZ
- Std.Time.instReprPlainDate
- Std.Time.instReprPlainDateTime
- Std.Time.instReprPlainTime
- Std.Time.instReprText
- Std.Time.instReprTimeZone
- Std.Time.instReprTimestamp
- Std.Time.instReprTimestamp_1
- Std.Time.instReprWeekday
- Std.Time.instReprYear
- Std.Time.instReprZoneId
- Std.Time.instReprZoneName
- Std.TreeMap.Raw.instRepr
- Std.TreeMap.instRepr
- Std.TreeSet.Raw.instRepr
- Std.TreeSet.instRepr
- String.instReprRange
- System.instReprFilePath
- ToAdditive.instReprConfig
- Units.instRepr
- WithBot.instRepr
- WithTop.instRepr
- instReprBool
- instReprChar
- instReprDecidable
- instReprEmpty
- instReprExcept
- instReprFin
- instReprFloat
- instReprFloat32
- instReprISize
- instReprId
- instReprId_1
- instReprInt
- instReprInt16
- instReprInt16_1
- instReprInt64
- instReprInt8
- instReprIterator
- instReprList
- instReprListOfReprAtom
- instReprNat
- instReprOption
- instReprOrdering_mathlib
- instReprPUnit
- instReprPos
- instReprProdOfReprTuple
- instReprSSet
- instReprSigma
- instReprSourceInfo
- instReprStdGen
- instReprString
- instReprSubarray
- instReprSubstring
- instReprSubtype
- instReprSum
- instReprUInt16
- instReprUInt32
- instReprUInt64
- instReprUInt8
- instReprULift
- instReprUSize
- instReprUnit
- instReprVector
Equations
Equations
Equations
- instReprEmpty = { reprPrec := fun (a : Empty) (a_1 : Nat) => nomatch a, a_1 }
Equations
- instReprBool = { reprPrec := fun (x : Bool) (x_1 : Nat) => match x, x_1 with | true, x => Std.Format.text "true" | false, x => Std.Format.text "false" }
Equations
- One or more equations did not get rendered due to their size.
Equations
- instReprPUnit = { reprPrec := fun (x : PUnit) (x : Nat) => Std.Format.text "PUnit.unit" }
Equations
- instReprULift = { reprPrec := fun (v : ULift α) (prec : Nat) => Repr.addAppParen (Std.Format.text "ULift.up " ++ reprArg v.down) prec }
Equations
- instReprUnit = { reprPrec := fun (x : Unit) (x : Nat) => Std.Format.text "()" }
Equations
- none.repr x✝ = Std.Format.text "none"
- (some a).repr x✝ = Repr.addAppParen (Std.Format.text "some " ++ reprArg a) x✝
Equations
- instReprOption = { reprPrec := Option.repr }
Equations
- (Sum.inl a).repr x✝ = Repr.addAppParen (Std.Format.text "Sum.inl " ++ reprArg a) x✝
- (Sum.inr b).repr x✝ = Repr.addAppParen (Std.Format.text "Sum.inr " ++ reprArg b) x✝
- reprTuple : α → List Std.Format → List Std.Format
Equations
- instReprTupleOfRepr = { reprTuple := fun (a : α) (xs : List Std.Format) => repr a :: xs }
Equations
- (a, b).repr x✝ = Std.Format.bracket "(" (Std.Format.joinSep (reprTuple b [repr a]).reverse (Std.Format.text "," ++ Std.Format.line)) ")"
Equations
- instReprSigma = { reprPrec := fun (x : Sigma β) (x_1 : Nat) => match x, x_1 with | ⟨a, b⟩, x => Std.Format.bracket "⟨" (repr a ++ Std.Format.text ", " ++ repr b) "⟩" }
Equations
- One or more equations did not get rendered due to their size.
@[extern lean_string_of_usize]
Equations
- n.repr = (Nat.toDigits 10 n.toNat).asString
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
- instReprNat = { reprPrec := fun (n x : Nat) => Std.Format.text n.repr }
Equations
- instReprInt = { reprPrec := fun (i : Int) (prec : Nat) => if i < 0 then Repr.addAppParen (Std.Format.text i.repr) prec else Std.Format.text i.repr }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Char.quoteCore.smallCharToHex c = hexDigitRepr (c.toNat / 16) ++ hexDigitRepr (c.toNat % 16)
Equations
- instReprChar = { reprPrec := fun (c : Char) (x : Nat) => Std.Format.text c.quote }
Equations
- instReprString = { reprPrec := fun (s : String) (x : Nat) => Std.Format.text s.quote }
Equations
- instReprPos = { reprPrec := fun (p : String.Pos) (x : Nat) => Std.Format.text "{ byteIdx := " ++ repr p.byteIdx ++ Std.Format.text " }" }
Equations
- instReprSubstring = { reprPrec := fun (s : Substring) (x : Nat) => Std.Format.text (s.toString.quote ++ ".toSubstring") }
Equations
- One or more equations did not get rendered due to their size.
Equations
- instReprFin n = { reprPrec := fun (f : Fin n) (x : Nat) => repr ↑f }
Equations
- [].repr n = Std.Format.text "[]"
- a.repr n = Std.Format.bracket "[" (Std.Format.joinSep a (Std.Format.text "," ++ Std.Format.line)) "]"
Equations
- instReprList = { reprPrec := List.repr }
Equations
- [].repr' n = Std.Format.text "[]"
- a.repr' n = Std.Format.bracketFill "[" (Std.Format.joinSep a (Std.Format.text "," ++ Std.Format.line)) "]"
Equations
- instReprListOfReprAtom = { reprPrec := List.repr' }
Equations
- instReprSourceInfo = { reprPrec := reprSourceInfo✝ }