mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-20 18:21:47 +03:00
14 lines
292 B
Idris
14 lines
292 B
Idris
|
import System
|
||
|
import System.Errno
|
||
|
|
||
|
main : IO ()
|
||
|
main = do
|
||
|
-- `2` is `ENOENT` on all OS
|
||
|
-- and the message is the same on all OS
|
||
|
let s = strerror 2
|
||
|
True <- pure (s == "No such file or directory")
|
||
|
| False => do
|
||
|
putStrLn ("strerror for 2 is " ++ s)
|
||
|
exitFailure
|
||
|
pure ()
|