Package Registries #
This module contains definitions for fetching Lake package information from a online registry (e.g., Reservoir).
Package source information from a Lake registry (e.g., Reservoir). Only contains the subset of fields useful to Lake.
- git: Lake.JsonObject → String → Option String → Option String → Option Lake.FilePath → Lake.RegistrySrc
- other: Lake.JsonObject → Lake.RegistrySrc
Instances For
Equations
- Lake.instInhabitedRegistrySrc = { default := Lake.RegistrySrc.git default default default default default }
Equations
- (Lake.RegistrySrc.git data url githubUrl? defaultBranch? subDir?).isGit = true
- (Lake.RegistrySrc.other data).isGit = false
Instances For
Equations
- (Lake.RegistrySrc.git data url githubUrl? defaultBranch? subDir?).data = data
- (Lake.RegistrySrc.other data).data = data
Instances For
Equations
- src.toJson = Lean.Json.obj src.data
Instances For
Equations
- Lake.RegistrySrc.instToJson = { toJson := Lake.RegistrySrc.toJson }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.RegistrySrc.instFromJson = { fromJson? := Lake.RegistrySrc.fromJson? }
Package metadata from a Lake registry (e.g., Reservoir). Only contains the subset of fields useful to Lake.
- name : String
- fullName : String
- sources : Array Lake.RegistrySrc
- data : Lean.Json
Instances For
Equations
- Lake.instInhabitedRegistryPkg = { default := { name := default, fullName := default, sources := default, data := default } }
Equations
- pkg.gitSrc? = pkg.sources.find? fun (x : Lake.RegistrySrc) => x.isGit
Instances For
Equations
- src.toJson = src.data
Instances For
Equations
- Lake.RegistryPkg.instToJson = { toJson := Lake.RegistryPkg.toJson }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.RegistryPkg.instFromJson = { fromJson? := Lake.RegistryPkg.fromJson? }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Encode a byte as a URI escape code (e.g., %20
).
Equations
- Lake.uriEscapeByte b s = ((s.push '%').push (Lake.hexEncodeByte (b >>> 4))).push (Lake.hexEncodeByte (b &&& 15))
Instances For
Folds a monadic function over the UTF-8 bytes of Char
from most significant to least significant.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Encode a character as a sequence of URI escape codes representing its UTF8 encoding.
Equations
- Lake.uriEscapeChar c s = Lake.foldlUtf8 c (fun (s : String) (b : UInt8) => Lake.uriEscapeByte b s) s
Instances For
A URI unreserved mark as specified in RFC2396.
Equations
- Lake.isUriUnreservedMark '-' = true
- Lake.isUriUnreservedMark '_' = true
- Lake.isUriUnreservedMark '.' = true
- Lake.isUriUnreservedMark '!' = true
- Lake.isUriUnreservedMark '~' = true
- Lake.isUriUnreservedMark '*' = true
- Lake.isUriUnreservedMark ''' = true
- Lake.isUriUnreservedMark '(' = true
- Lake.isUriUnreservedMark ')' = true
- Lake.isUriUnreservedMark c = false
Instances For
Encodes anything but a URI unreserved character as a URI escape sequences.
Equations
- Lake.uriEncodeChar c s = if (c.isAlphanum || Lake.isUriUnreservedMark c) = true then s.push c else Lake.uriEscapeChar c s
Instances For
Encodes a string as an ASCII URI component, escaping special characters (and unicode).
Equations
- Lake.uriEncode s = String.foldl (fun (s : String) (c : Char) => Lake.uriEncodeChar c s) "" s
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
A Reservoir API response object.
- data: {α : Type u} → α → Lake.ReservoirResp α
- error: {α : Type u} → Nat → String → Lake.ReservoirResp α
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.instFromJsonReservoirResp = { fromJson? := Lake.ReservoirResp.fromJson? }
Equations
- Lake.Reservoir.lakeHeaders = #["X-Reservoir-Api-Version:1.0.0", "X-Lake-Registry-Api-Version:0.1.0"]
Instances For
Equations
- One or more equations did not get rendered due to their size.