def get
import bolt@1.27.0.0/src/lsp/docs.bend as Docsimport Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
43# the text of an open document, when it is open
44def get(docs: List<&2, Doc>, +uri: String) -> Maybe<&2, String>:
45 match docs:
46 case Nil{}:
47 None{}
48 case Con{Doc{u, t, e, m}, r}:
49 Lazy.stop(Maybe<&2, String>, String.eq(u, uri), Some{t}, _u => get(r, uri))