[hs] Solve 2020_02
This commit is contained in:
parent
6ad7c5108d
commit
7183f49a6b
4 changed files with 57 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue