Version #
This module contains useful definitions for manipulating versions.
Equations
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.instReprSemVerCore = { reprPrec := Lake.instReprSemVerCore.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- Lake.instOrdSemVerCore = { compare := Lake.instOrdSemVerCore.ord }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.instToStringSemVerCore = { toString := Lake.SemVerCore.toString }
Equations
- Lake.instToJsonSemVerCore = { toJson := fun (x : Lake.SemVerCore) => Lean.Json.str x.toString }
Equations
- Lake.instFromJsonSemVerCore = { fromJson? := fun (x : Lean.Json) => do let __do_lift ← Lean.fromJson? x Lake.SemVerCore.parse __do_lift }
Equations
- Lake.instInhabitedStdVer = { default := Lake.instInhabitedStdVer.default }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.instReprStdVer = { reprPrec := Lake.instReprStdVer.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[reducible, inline]
A Lean version.
Equations
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.instOrdStdVer = { compare := Lake.StdVer.compare }
Equations
- Lake.instToStringStdVer = { toString := Lake.StdVer.toString }
Equations
- Lake.instToJsonStdVer = { toJson := fun (x : Lake.StdVer) => Lean.Json.str x.toString }
Equations
- Lake.instFromJsonStdVer = { fromJson? := fun (x : Lean.Json) => do let __do_lift ← Lean.fromJson? x Lake.StdVer.parse __do_lift }
The elan toolchain file name (i.e., lean-toolchain).
Equations
- Lake.toolchainFileName = { toString := "lean-toolchain" }
Instances For
Equations
- Lake.ToolchainVer.defaultOrigin = "leanprover/lean4"
Instances For
Equations
- Lake.ToolchainVer.prOrigin = "leanprover/lean4-pr-releases"
Instances For
A Lean toolchain version.
- release (ver : LeanVer) : ToolchainVer
- nightly (date : Date) : ToolchainVer
- pr (n : Nat) : ToolchainVer
- other (v : String) : ToolchainVer
Instances For
@[implemented_by Lake.ToolchainVer.toString._override]
Equations
- (Lake.ToolchainVer.release ver).toString = toString Lake.ToolchainVer.defaultOrigin ++ toString ":v" ++ toString ver
- (Lake.ToolchainVer.nightly date).toString = toString Lake.ToolchainVer.defaultOrigin ++ toString ":nightly-" ++ toString date
- (Lake.ToolchainVer.pr n).toString = toString Lake.ToolchainVer.prOrigin ++ toString ":pr-release-" ++ toString n
- (Lake.ToolchainVer.other v).toString = v
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.instReprToolchainVer = { reprPrec := Lake.instReprToolchainVer.repr }
Equations
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.release a) (Lake.ToolchainVer.release b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.release ver) (Lake.ToolchainVer.nightly date) = isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.release ver) (Lake.ToolchainVer.pr n) = isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.release ver) (Lake.ToolchainVer.other v) = isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.nightly date) (Lake.ToolchainVer.release ver) = isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.nightly a) (Lake.ToolchainVer.nightly b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.nightly date) (Lake.ToolchainVer.pr n) = isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.nightly date) (Lake.ToolchainVer.other v) = isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.pr n) (Lake.ToolchainVer.release ver) = isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.pr n) (Lake.ToolchainVer.nightly date) = isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.pr a) (Lake.ToolchainVer.pr b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.pr n) (Lake.ToolchainVer.other v) = isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.other v) (Lake.ToolchainVer.release ver) = isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.other v) (Lake.ToolchainVer.nightly date) = isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.other v) (Lake.ToolchainVer.pr n) = isFalse ⋯
- Lake.instDecidableEqToolchainVer.decEq (Lake.ToolchainVer.other a) (Lake.ToolchainVer.other b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Parse a toolchain from a lean-toolchain file.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
Parse a toolchain from the lean-toolchain file of the directory dir.
Equations
Instances For
Equations
- Lake.ToolchainVer.instToString = { toString := Lake.ToolchainVer.toString }
Equations
- Lake.ToolchainVer.instToJson = { toJson := fun (x : Lake.ToolchainVer) => Lean.Json.str x.toString }
Equations
- Lake.ToolchainVer.instFromJson = { fromJson? := fun (x : Lean.Json) => Lake.ToolchainVer.ofString <$> Lean.fromJson? x }
Equations
- (Lake.ToolchainVer.release v1).blt (Lake.ToolchainVer.release v2) = decide (v1 < v2)
- (Lake.ToolchainVer.nightly d1).blt (Lake.ToolchainVer.nightly d2) = decide (d1 < d2)
- a.blt b = false
Instances For
Equations
- Lake.ToolchainVer.instLT = { lt := fun (x1 x2 : Lake.ToolchainVer) => x1.blt x2 = true }
Equations
- a.decLt b = decidable_of_bool (a.blt b) ⋯
Equations
- (Lake.ToolchainVer.release v1).ble (Lake.ToolchainVer.release v2) = decide (v1 ≤ v2)
- (Lake.ToolchainVer.nightly d1).ble (Lake.ToolchainVer.nightly d2) = decide (d1 ≤ d2)
- (Lake.ToolchainVer.pr n1).ble (Lake.ToolchainVer.pr n2) = decide (n1 = n2)
- (Lake.ToolchainVer.other v1).ble (Lake.ToolchainVer.other v2) = decide (v1 = v2)
- a.ble b = false
Instances For
Equations
- Lake.ToolchainVer.instLE = { le := fun (x1 x2 : Lake.ToolchainVer) => x1.ble x2 = true }
Equations
- a.decLe b = decidable_of_bool (a.ble b) ⋯
Converts a toolchain version to its normal form (e.g., with an origin).
Equations
Instances For
Equations
- Lake.instDecodeVersionSemVerCore = { decodeVersion := Lake.SemVerCore.parse }
@[defaultInstance 1000]
Equations
- Lake.instDecodeVersionStdVer = { decodeVersion := Lake.StdVer.parse }
Equations
- Lake.instDecodeVersionToolchainVer = { decodeVersion := fun (x : String) => pure (Lake.ToolchainVer.ofString x) }