[hs] Rename dayParser to dayParse
This commit is contained in:
parent
9d02c4344d
commit
6ad7c5108d
2 changed files with 4 additions and 4 deletions
|
|
@ -4,7 +4,7 @@ module Aoc.Day
|
|||
, dayFile
|
||||
, dayString
|
||||
, dayText
|
||||
, dayParser
|
||||
, dayParse
|
||||
) where
|
||||
|
||||
import Control.Monad
|
||||
|
|
@ -31,8 +31,8 @@ dayString name f = dayFile name $ f <=< readFile
|
|||
dayText :: String -> (T.Text -> IO ()) -> Day
|
||||
dayText name f = dayFile name $ f <=< T.readFile
|
||||
|
||||
dayParser :: String -> Parser a -> (a -> IO ()) -> Day
|
||||
dayParser name p f = dayFile name $ \path -> do
|
||||
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
|
||||
Right a -> f a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue