Version #
This module contains useful definitions for manipulating versions.
It also defines a v!"<ver>"
syntax for version literals.
Equations
- Lake.instInhabitedSemVerCore = { default := { major := default, minor := default, patch := default } }
Equations
- Lake.instReprSemVerCore = { reprPrec := Lake.reprSemVerCore✝ }
Equations
- Lake.instOrdSemVerCore = { compare := Lake.ordSemVerCore✝ }
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
- One or more equations did not get rendered due to their size.
Equations
- Lake.instInhabitedStdVer = { default := { toSemVerCore := default, specialDescr := default } }
Equations
- Lake.instReprStdVer = { reprPrec := Lake.reprStdVer✝ }
@[reducible, inline]
A Lean version.
Equations
Instances For
Equations
@[inline]
Equations
- Lake.StdVer.ofSemVerCore ver = { toSemVerCore := ver, specialDescr := "" }
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.instOrdStdVer = { compare := Lake.StdVer.compare }
Equations
- One or more equations did not get rendered due to their size.
Instances For
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 }
Equations
- One or more equations did not get rendered due to their size.
A Lean toolchain version.
- release (ver : Lake.LeanVer) : Lake.ToolchainVer
- nightly (date : Lake.Date) : Lake.ToolchainVer
- pr (no : Nat) : Lake.ToolchainVer
- other (name : String) : Lake.ToolchainVer
Instances For
Equations
- Lake.instReprToolchainVer = { reprPrec := Lake.reprToolchainVer✝ }
Equations
Equations
- Lake.ToolchainVer.defaultOrigin = "leanprover/lean4"
Instances For
Equations
- Lake.ToolchainVer.prOrigin = "leanprover/lean4-pr-releases"
Instances For
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
The elan
toolchain file name (i.e., lean-toolchain
).
Equations
- Lake.toolchainFileName = { toString := "lean-toolchain" }
Instances For
@[inline]
Parse a toolchain from the lean-toolchain
file of the directory dir
.
Equations
Instances For
Equations
- (Lake.ToolchainVer.release a).toString = toString "" ++ toString Lake.ToolchainVer.defaultOrigin ++ toString ":v" ++ toString a ++ toString ""
- (Lake.ToolchainVer.nightly a).toString = toString "" ++ toString Lake.ToolchainVer.defaultOrigin ++ toString ":nightly-" ++ toString a ++ toString ""
- (Lake.ToolchainVer.pr a).toString = toString "" ++ toString Lake.ToolchainVer.prOrigin ++ toString ":pr-release-" ++ toString a ++ toString ""
- (Lake.ToolchainVer.other a).toString = a
Instances For
Equations
- Lake.instToStringToolchainVer = { toString := Lake.ToolchainVer.toString }
Equations
- Lake.instToJsonToolchainVer = { toJson := fun (x : Lake.ToolchainVer) => Lean.Json.str x.toString }
Equations
- Lake.instFromJsonToolchainVer = { fromJson? := fun (x : Lean.Json) => Lake.ToolchainVer.ofString <$> Lean.fromJson? x }
Equations
- (Lake.ToolchainVer.release v1).lt (Lake.ToolchainVer.release v2) = (v1 < v2)
- (Lake.ToolchainVer.nightly d1).lt (Lake.ToolchainVer.nightly d2) = (d1 < d2)
- a.lt b = False
Instances For
Equations
- Lake.instLTToolchainVer = { lt := Lake.ToolchainVer.lt }
Equations
- (Lake.ToolchainVer.release v1).decLt (Lake.ToolchainVer.release v2) = inferInstanceAs (Decidable (v1 < v2))
- (Lake.ToolchainVer.nightly d1).decLt (Lake.ToolchainVer.nightly d2) = inferInstanceAs (Decidable (d1 < d2))
- (Lake.ToolchainVer.release ver).decLt (Lake.ToolchainVer.pr no) = isFalse Lake.ToolchainVer.decLt.proof_1
- (Lake.ToolchainVer.release ver).decLt (Lake.ToolchainVer.nightly date) = isFalse Lake.ToolchainVer.decLt.proof_1
- (Lake.ToolchainVer.release ver).decLt (Lake.ToolchainVer.other name) = isFalse Lake.ToolchainVer.decLt.proof_1
- (Lake.ToolchainVer.nightly date).decLt (Lake.ToolchainVer.release ver) = isFalse Lake.ToolchainVer.decLt.proof_1
- (Lake.ToolchainVer.nightly date).decLt (Lake.ToolchainVer.pr no) = isFalse Lake.ToolchainVer.decLt.proof_1
- (Lake.ToolchainVer.nightly date).decLt (Lake.ToolchainVer.other name) = isFalse Lake.ToolchainVer.decLt.proof_1
- (Lake.ToolchainVer.pr no).decLt b = isFalse Lake.ToolchainVer.decLt.proof_1
- (Lake.ToolchainVer.other name).decLt b = isFalse Lake.ToolchainVer.decLt.proof_1
Equations
- (Lake.ToolchainVer.release v1).le (Lake.ToolchainVer.release v2) = (v1 ≤ v2)
- (Lake.ToolchainVer.nightly d1).le (Lake.ToolchainVer.nightly d2) = (d1 ≤ d2)
- (Lake.ToolchainVer.pr n1).le (Lake.ToolchainVer.pr n2) = (n1 = n2)
- (Lake.ToolchainVer.other v1).le (Lake.ToolchainVer.other v2) = (v1 = v2)
- a.le b = False
Instances For
Equations
- Lake.instLEToolchainVer = { le := Lake.ToolchainVer.le }
Equations
- (Lake.ToolchainVer.release v1).decLe (Lake.ToolchainVer.release v2) = inferInstanceAs (Decidable (v1 ≤ v2))
- (Lake.ToolchainVer.nightly d1).decLe (Lake.ToolchainVer.nightly d2) = inferInstanceAs (Decidable (d1 ≤ d2))
- (Lake.ToolchainVer.pr n1).decLe (Lake.ToolchainVer.pr n2) = inferInstanceAs (Decidable (n1 = n2))
- (Lake.ToolchainVer.other v1).decLe (Lake.ToolchainVer.other v2) = inferInstanceAs (Decidable (v1 = v2))
- (Lake.ToolchainVer.release ver).decLe (Lake.ToolchainVer.pr no) = isFalse Lake.ToolchainVer.decLe.proof_1
- (Lake.ToolchainVer.release ver).decLe (Lake.ToolchainVer.nightly date) = isFalse Lake.ToolchainVer.decLe.proof_1
- (Lake.ToolchainVer.release ver).decLe (Lake.ToolchainVer.other name) = isFalse Lake.ToolchainVer.decLe.proof_1
- (Lake.ToolchainVer.nightly date).decLe (Lake.ToolchainVer.release ver) = isFalse Lake.ToolchainVer.decLe.proof_1
- (Lake.ToolchainVer.nightly date).decLe (Lake.ToolchainVer.pr no) = isFalse Lake.ToolchainVer.decLe.proof_1
- (Lake.ToolchainVer.nightly date).decLe (Lake.ToolchainVer.other name) = isFalse Lake.ToolchainVer.decLe.proof_1
- (Lake.ToolchainVer.pr no).decLe (Lake.ToolchainVer.release ver) = isFalse Lake.ToolchainVer.decLe.proof_1
- (Lake.ToolchainVer.pr no).decLe (Lake.ToolchainVer.nightly date) = isFalse Lake.ToolchainVer.decLe.proof_1
- (Lake.ToolchainVer.pr no).decLe (Lake.ToolchainVer.other name) = isFalse Lake.ToolchainVer.decLe.proof_1
- (Lake.ToolchainVer.other name).decLe (Lake.ToolchainVer.release ver) = isFalse Lake.ToolchainVer.decLe.proof_1
- (Lake.ToolchainVer.other name).decLe (Lake.ToolchainVer.nightly date) = isFalse Lake.ToolchainVer.decLe.proof_1
- (Lake.ToolchainVer.other name).decLe (Lake.ToolchainVer.pr no) = isFalse Lake.ToolchainVer.decLe.proof_1
Version Literals #
Defines the v!"<ver>"
syntax for version literals.
The elaborator attempts to synthesize an instance of ToVersion
for the
expected type and then applies it to the string literal.
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) }
A Lake version literal.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.