FR
importPour l'utiliser : import System.File.Handle

System.File.Handle — streaming file access

Synopsis
data Handle = MkHandle Int

An open file handle (opaque).

data Mode = Read | Write | Append

How to open a file.

hGetLine : Handle -> Result FileError String with FS

Read the next line from a handle opened for reading (without the newline). Returns an error at end of file.

hClose : Handle -> () with FS

Close a handle.

withFile : Path -> Mode -> (Handle -> a with FS) -> Result FileError a with FS

Open a file, run an action with the handle, and close it afterwards (whether or not the action succeeds in producing its value).