mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-13 07:52:36 +03:00
16 lines
450 B
Idris
16 lines
450 B
Idris
import System.Signal
|
|
import System
|
|
|
|
main : IO ()
|
|
main = do
|
|
Right () <- ignoreSignal SigABRT
|
|
| Left (Error code) => putStrLn $ "error " ++ (show code)
|
|
putStrLn "before"
|
|
Right () <- raiseSignal SigABRT
|
|
| Left (Error code) => putStrLn $ "received error code from signal call: " ++ (show code)
|
|
sleep 1
|
|
putStrLn "after"
|
|
Right () <- defaultSignal SigABRT
|
|
| Left (Error code) => putStrLn $ "error " ++ (show code)
|
|
putStrLn "done."
|