[hs] Solve 2020_02

This commit is contained in:
Joscha 2020-12-03 11:12:27 +00:00
parent 6ad7c5108d
commit 7183f49a6b
4 changed files with 57 additions and 2 deletions

View file

@ -34,6 +34,6 @@ dayText name f = dayFile name $ f <=< T.readFile
dayParse :: String -> Parser a -> (a -> IO ()) -> Day
dayParse name p f = dayFile name $ \path -> do
text <- T.readFile path
case parse p path text of
case parse (p <* eof) path text of
Right a -> f a
Left e -> putStrLn $ errorBundlePretty e