mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-20 18:21:47 +03:00
4eff6ac916
This function is what users want 99.9% of time.
13 lines
284 B
Idris
13 lines
284 B
Idris
import System
|
|
import System.Directory
|
|
|
|
panic : String -> IO a
|
|
panic s = do putStrLn s
|
|
exitFailure
|
|
|
|
main : IO ()
|
|
main = do Right ["a"] <- listDir "dir"
|
|
| Left e => panic (show e)
|
|
| Right x => panic ("wrong entries: " ++ (show x))
|
|
pure ()
|