blob: e2faf59bb7c93cea4e2e0079dfe72f08036a836b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
module Main
import Day1
import System
import System.File
import Data.Fin
import Data.String
runDay : Int -> String -> String
runDay n inp = case n of
1 => unlines [Day1.sol1 inp, Day1.sol2 inp]
_ => "Not implemented yet!"
main : IO ()
main = do
args <- getArgs
digit <- maybe (die "Usage: aoc <daynumber>") pure $ getAt 1 args
num <- maybe (die "Usage: aoc <daynumber>") pure (parseInteger digit)
einp <- readFile ("./data/day" ++ (show num) ++ ".txt")
inp <- either (const $ die "Not implemented yet!") pure einp
putStrLn $ runDay num inp
pure ()
|