Initial commit

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

28
src/AoC.hs Normal file
View file

@ -0,0 +1,28 @@
{-# LANGUAGE OverloadedStrings #-}
module AoC (
defaultMain,
) where
import AoC.Day
import AoC.Riddle
import AoC.Year
import Control.Exception qualified as Exception
import System.IO (hPutStrLn)
import System.IO.Error qualified as IOError
-- import AoC.Y0000 qualified as Y0000
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