Equations
- Lean.instToJsonJson = { toJson := id }
Equations
- Lean.instFromJsonJsonNumber = { fromJson? := Lean.Json.getNum? }
Equations
- Lean.instToJsonJsonNumber = { toJson := Lean.Json.num }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.instToJsonBool = { toJson := fun (b : Bool) => Lean.Json.bool b }
Equations
- Lean.instFromJsonNat = { fromJson? := Lean.Json.getNat? }
Equations
- Lean.instToJsonString = { toJson := fun (s : String) => Lean.Json.str s }
Equations
- Lean.instFromJsonFilePath = { fromJson? := fun (j : Lean.Json) => System.FilePath.mk <$> j.getStr? }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.instToJsonArray = { toJson := fun (a : Array α) => Lean.Json.arr (Array.map Lean.toJson a) }
Equations
- Lean.instFromJsonList = { fromJson? := fun (j : Lean.Json) => Except.map Array.toList (Lean.fromJson? j) }
Equations
- Lean.instFromJsonOption = { fromJson? := fun (x : Lean.Json) => match x with | Lean.Json.null => Except.ok none | j => some <$> Lean.fromJson? j }
Equations
- Lean.instToJsonOption = { toJson := fun (x : Option α) => match x with | none => Lean.Json.null | some a => Lean.toJson a }
instance
Lean.instFromJsonProd
{α : Type u}
{β : Type v}
[Lean.FromJson α]
[Lean.FromJson β]
:
Lean.FromJson (α × β)
Equations
- One or more equations did not get rendered due to their size.
instance
Lean.instToJsonProd
{α : Type u_1}
{β : Type u_2}
[Lean.ToJson α]
[Lean.ToJson β]
:
Lean.ToJson (α × β)
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.instToJsonFloat = { toJson := fun (x : Float) => match Lean.JsonNumber.fromFloat? x with | Sum.inl e => Lean.Json.str e | Sum.inr n => Lean.Json.num n }
instance
Lean.instToJsonRBMapString
{α : Type}
{cmp : String → String → Ordering}
[Lean.ToJson α]
:
Lean.ToJson (Lean.RBMap String α cmp)
instance
Lean.instFromJsonRBMapString
{α : Type}
{cmp : String → String → Ordering}
[Lean.FromJson α]
:
Lean.FromJson (Lean.RBMap String α cmp)
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- j.getObjValAs? α k = Lean.fromJson? (j.getObjValD k)
Instances For
Equations
- j.setObjValAs! k v = j.setObjVal! k (Lean.toJson v)