[hs] Solve 2020_03
This commit is contained in:
parent
7183f49a6b
commit
23636d3fc0
4 changed files with 56 additions and 6 deletions
|
|
@ -1,5 +1,6 @@
|
|||
module Aoc.Day
|
||||
( Day(..)
|
||||
, runDay
|
||||
, dayPure
|
||||
, dayFile
|
||||
, dayString
|
||||
|
|
@ -19,6 +20,11 @@ data Day
|
|||
= DayPure String (IO ())
|
||||
| DayFile String (FilePath -> IO ())
|
||||
|
||||
-- | Helper function for trying out days in ghci.
|
||||
runDay :: Day -> FilePath -> IO ()
|
||||
runDay (DayPure _ f) _ = f
|
||||
runDay (DayFile _ f) p = f p
|
||||
|
||||
dayPure :: String -> IO () -> Day
|
||||
dayPure = DayPure
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue