/* * Copyright 2026 Flix Authors * * Use of this source code is governed by the Apache 2.0 license * that can be found in the LICENSE.md file. */////// Effect for reading the lines of a file, and its functions.///pubmod Fs.ReadLines {use Fs.FileRead////// Effect for reading the lines of a file.////// Use the `ReadLines.runWithFileRead` handler.///pubeffReadLines {////// Returns a list of all lines in the given file `f`.///defreadLines(f: String): Result[IoError, List[String]] }////// Handles the `ReadLines` effect of the given function `f` using the `FileRead` effect.///pubdefrunWithFileRead(f: Unit -> a \ ef): a \ (ef - ReadLines) + FileRead =run { f() } withhandlerReadLines {defreadLines(filename, k) = k(Fs.FileRead.readLines(filename)) }}