mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-20 10:02:03 +03:00
11 lines
324 B
Idris
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
|