Equations
- Lean.instFromJsonJson = { fromJson? := Except.ok }
Equations
- Lean.instToJsonJson = { toJson := id }
Equations
- Lean.instFromJsonJsonNumber = { fromJson? := Lean.Json.getNum? }
Equations
- Lean.instToJsonJsonNumber = { toJson := Lean.Json.num }
Equations
- Lean.instFromJsonBool = { fromJson? := Lean.Json.getBool? }
Equations
- Lean.instToJsonBool = { toJson := fun (b : Bool) => Lean.Json.bool b }
Equations
- Lean.instFromJsonNat = { fromJson? := Lean.Json.getNat? }
Equations
- Lean.instToJsonNat = { toJson := fun (n : Nat) => Lean.Json.num (Lean.JsonNumber.fromNat n) }
Equations
- Lean.instFromJsonInt = { fromJson? := Lean.Json.getInt? }
Equations
- Lean.instToJsonInt = { toJson := fun (n : Int) => Lean.Json.num (Lean.JsonNumber.fromInt n) }
Equations
- Lean.instFromJsonString = { fromJson? := Lean.Json.getStr? }
Equations
- Lean.instToJsonString = { toJson := fun (s : String) => Lean.Json.str s }
Equations
- Lean.instFromJsonFilePath = { fromJson? := fun (j : Lean.Json) => System.FilePath.mk <$> Lean.Json.getStr? j }
Equations
- Lean.instToJsonFilePath = { toJson := fun (p : Lake.FilePath) => Lean.Json.str p.toString }
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.instToJsonList = { toJson := fun (xs : List α) => Lean.toJson (List.toArray xs) }
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
- Lean.instToJsonProd = { toJson := fun (x : α × β) => match x with | (a, b) => Lean.Json.arr #[Lean.toJson a, Lean.toJson b] }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.instToJsonName = { toJson := fun (n : Lake.Name) => Lean.Json.str (toString n) }
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.instToJsonUSize = { toJson := fun (v : USize) => Lean.bignumToJson (USize.toNat v) }
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.instToJsonUInt64 = { toJson := fun (v : UInt64) => Lean.bignumToJson (UInt64.toNat v) }
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 }
Equations
- One or more equations did not get rendered due to their size.
instance
Lean.instToJsonRBMapString
{α : Type}
{cmp : String → String → Ordering}
[Lean.ToJson α]
:
Lean.ToJson (Lean.RBMap String α cmp)
Equations
- Lean.instToJsonRBMapString = { toJson := fun (m : Lean.RBMap String α cmp) => Lean.Json.obj (Lean.RBNode.map (fun (x : String) => Lean.toJson) m.val) }
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.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Json.getObjValAs? j α k = Lean.fromJson? (Lean.Json.getObjValD j k)
Instances For
Equations
- Lean.Json.setObjValAs! j k v = Lean.Json.setObjVal! j k (Lean.toJson v)
Instances For
Equations
- Lean.Json.opt k x = match x with | none => [] | some o => [(k, Lean.toJson o)]