21 lines
471 B
Haskell
21 lines
471 B
Haskell
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
module AoC (
|
|
defaultMain,
|
|
) where
|
|
|
|
import Control.Exception qualified as Exception
|
|
import System.IO (hPutStrLn)
|
|
import System.IO.Error qualified as IOError
|
|
|
|
runAoC :: [String] -> IO ()
|
|
runAoC _args = putStrLn "Hello"
|
|
|
|
handleError :: IOError.IOError -> IO ()
|
|
handleError e = do
|
|
hPutStrLn stderr $ "I ran into an issue: " <> show e
|
|
|
|
defaultMain :: IO ()
|
|
defaultMain = do
|
|
args <- getArgs
|
|
Exception.catch (runAoC args) handleError
|