Initial commit
This commit is contained in:
commit
cf2af11b6b
23 changed files with 3988 additions and 0 deletions
20
src/AoC/Riddle.hs
Normal file
20
src/AoC/Riddle.hs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
module AoC.Riddle (
|
||||
Riddle (..),
|
||||
Error (..),
|
||||
Solution (..),
|
||||
loadRiddle,
|
||||
) where
|
||||
|
||||
import AoC.Util (readFileUtf8)
|
||||
|
||||
import AoC.Day
|
||||
import AoC.Year
|
||||
|
||||
type Riddle = Text
|
||||
type Error = Text
|
||||
type Solution = [Integer]
|
||||
|
||||
loadRiddle :: (MonadIO m) => Year -> Day -> m Riddle
|
||||
loadRiddle y d = readFileUtf8 inputFile
|
||||
where
|
||||
inputFile = intercalate "/" ["data", show y, show d, "riddle"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue