def read_text_opt2
import cswap-bend-cli@0.1.0.0/swlive.bend as Swliveimport Base
import cswap-bend-cli@0.1.0.0/fs.bend as Fs
import cswap-bend-cli@0.1.0.0/act.bend as Act
74def read_text_opt2(+ex: Bool, +path: String) -> Act.of(Maybe<&2, String>):
75 match ex:
76 case False{}:
77 Act.pure(Maybe<&2, String>, None{})
78 case True{}:
79 do ActM<Maybe<&2, String>>:
80 t : String <- Fs.read_file(path)
81 return Some{t}