Initial commit

This commit is contained in:
Alexander Kobjolke 2023-11-29 21:29:32 +01:00
commit d45d07b39b
13 changed files with 507 additions and 0 deletions

21
src/AoC.hs Normal file
View file

@ -0,0 +1,21 @@
{-# 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