mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-26 05:01:34 +03:00
a972778eab
They don't all pass yet, for minor reasons. Coming shortly... Unfortunately the startup overhead for chez is really noticeable here!
16 lines
434 B
Idris
16 lines
434 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
|
|
writeFile "test.txt" "hello\n"
|
|
printLn !currentDir
|
|
|