Don't really need a separate function to fmap pharmacy
This commit is contained in:
parent
d021155df2
commit
b21cd8d909
1 changed files with 1 additions and 4 deletions
|
@ -15,14 +15,11 @@ readCSV filePath = do
|
||||||
Left e -> (putStrLn $ show e) >> exitFailure
|
Left e -> (putStrLn $ show e) >> exitFailure
|
||||||
Right rows -> return rows
|
Right rows -> return rows
|
||||||
|
|
||||||
getPharmacy :: String -> IO Pharmacy
|
|
||||||
getPharmacy = fmap pharmacy . readCSV
|
|
||||||
|
|
||||||
getCurrentState :: IO State
|
getCurrentState :: IO State
|
||||||
getCurrentState =
|
getCurrentState =
|
||||||
currentState
|
currentState
|
||||||
<$> (utctDay <$> getCurrentTime)
|
<$> (utctDay <$> getCurrentTime)
|
||||||
<*> getPharmacy "medicine.csv"
|
<*> (pharmacy <$> readCSV "medicine.csv")
|
||||||
<*> readCSV "timeline.csv"
|
<*> readCSV "timeline.csv"
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
|
|
Loading…
Reference in a new issue