Idris2/tests/idris2/error/perror016/ParseIf4.idr
2023-09-07 14:57:22 +01:00

11 lines
324 B
Idris

import System.File
foo : File -> IO ()
foo file = do
stuff <- fgetLine file
case stuff of
(Left err) => printLn err
(Right content) => if content == ""
then println "Empty"
else blah <- doSomething
putStrLn content