bolt/lsp/files/service.bend checks
raw source on the hub · import 0x729eecea86ea5a2cdba3a2856a313bca/bolt/lsp/files/service.bend as Service
files: an effect service: a file's text by path, and where Base lives.
1 import
import Base
Types
type Files source · line 5 · raw
Type
effect service: a file's text, and where Base is
Files@read:(@_:String -> IO(Maybe<&2, String>)) -> @base_path:(@_:Unit -> IO(String)) -> Files
Definitions
def read source · line 9 · raw
@f:Files -> @path:String -> IO(Maybe<&2, String>)
None when the file cannot be read
def base_path source · line 14 · raw
@f:Files -> IO(String)
the path of Base, from a files service
Templates
template read_all source · line 19 · raw
@-f:Files -> @paths:List<&2, String> -> IO(List<&2, Maybe<&2, String>>)
every path read, in order (a missing file is a None)