diff options
Diffstat (limited to 'app/Die.hs')
-rw-r--r-- | app/Die.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/Die.hs b/app/Die.hs new file mode 100644 index 0000000..a14f6b8 --- /dev/null +++ b/app/Die.hs @@ -0,0 +1,9 @@ +module Die (die) where + +import System.Exit (ExitCode (ExitFailure), exitWith) +import Text.Printf (printf) + +die :: String -> IO a +die s = do + printf "error: %s\n" s + exitWith (ExitFailure 1) |