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 (data : JsonObject) (url : String) (githubUrl? defaultBranch? : Option String) (subDir? : Option System.FilePath) : RegistrySrc
 - other (data : JsonObject) : RegistrySrc
 
Instances For
Equations
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 RegistrySrc
 - data : Lean.Json
 
Instances For
Equations
Instances For
Equations
Equations
- pkg.gitSrc? = Array.find? (fun (x : Lake.RegistrySrc) => x.isGit) pkg.sources
 
Instances For
Instances For
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
Equations
- Lake.foldlUtf8 c f init = (Lake.foldlUtf8M c (fun (x1 : σ) (x2 : UInt8) => pure (f x1 x2)) init).run
 
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
A Reservoir API response object.
- data {α : Type u} (a : α) : ReservoirResp α
 - error {α : Type u} (status : Nat) (message : String) : 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.pkgApiUrl lakeEnv owner pkg = toString lakeEnv.reservoirApiUrl ++ toString "/packages/" ++ toString (Lake.uriEncode owner) ++ toString "/" ++ toString (Lake.uriEncode pkg)
 
Instances For
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.