Idris2/tests/base/system_file_fRead/ReadFile.idr

10 lines
208 B
Idris
Raw Normal View History

2021-11-03 18:56:29 +03:00
import System.File
main : IO ()
main = do
Right f <- openFile "sampleFile.txt" Read
| Left err => printLn err
Right contents <- fRead f
| Left err => printLn err
printLn contents