mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-28 11:05:17 +03:00
a972778eab
They don't all pass yet, for minor reasons. Coming shortly... Unfortunately the startup overhead for chez is really noticeable here!
15 lines
390 B
Idris
15 lines
390 B
Idris
import System.File
|
|
|
|
main : IO ()
|
|
main
|
|
= do Right ok <- readFile "test.txt"
|
|
| Left err => printLn err
|
|
putStr ok
|
|
writeFile "testout.txt" "abc\ndef\n"
|
|
Right ok <- readFile "testout.txt"
|
|
| Left err => printLn err
|
|
putStr ok
|
|
Right ok <- readFile "notfound"
|
|
| Left err => printLn err
|
|
putStr ok
|