From 93c9ee6a703eee31abdadbcd5bbd269fb67d25f0 Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Mon, 30 Jun 2025 17:21:46 -0500 Subject: Working on parsing papers --- src/Data/Paper.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Data') diff --git a/src/Data/Paper.hs b/src/Data/Paper.hs index 34c6fad..25b6d98 100644 --- a/src/Data/Paper.hs +++ b/src/Data/Paper.hs @@ -141,7 +141,7 @@ mkPaper bib = do getDate = mapM findit [ "month", "year" ] >>= parseTimeM True defaultTimeLocale "%b %Y" . unwords puri :: MonadFail m => String -> m URI -puri u = undefined +puri u = maybe (fail $ show u <> " cannot be understood as a uri") pure $ parseURI u findit :: (Show a, Ord a, MonadFail m) => a -> M.Map a x -> m x findit k = maybe (fail $ "Field " <> show k <> " does not exist") pure . M.lookup k -- cgit v1.2.3