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.instToJsonSemVerCore = { toJson := fun (x : Lake.SemVerCore) => Lean.Json.str x.toString }
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
@[inline]
Equations
- Lake.StdVer.ofSemVerCore ver = { toSemVerCore := ver, specialDescr := "" }
Instances For
Equations
Equations
- Lake.instOrdStdVer = { compare := Lake.StdVer.compare }
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: Lake.LeanVer → Lake.ToolchainVer
- nightly: Lake.Date → Lake.ToolchainVer
- pr: Nat → Lake.ToolchainVer
- other: String → Lake.ToolchainVer
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.
Instances For
The elan
toolchain file name (i.e., 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.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.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 }
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.