mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-24 06:52:19 +03:00
15 lines
442 B
Idris
15 lines
442 B
Idris
import System.Directory
|
|
|
|
main : IO ()
|
|
main = do Right () <- createDir "testdir"
|
|
| Left err => printLn err
|
|
Left err <- createDir "testdir"
|
|
| _ => printLn "That wasn't supposed to work"
|
|
printLn err
|
|
ok <- changeDir "nosuchdir"
|
|
printLn ok
|
|
ok <- changeDir "testdir"
|
|
printLn ok
|
|
ignore $ writeFile "test.txt" "hello\n"
|
|
printLn !currentDir
|