Commit cef44a030661c6e8e543bd902f8ce91a9183e392 Parent: 9cc0f1060b1ef8ca202e538a6692d4172d0cae35 Author: mcol <mcol@posteo.net> Date: 2021-09-23 22:24:43 +0100 Committer: mcol <mcol@posteo.net> Committed: 2021-09-23 22:24:43 +0100 use fromRight as per hlint
src/Repositories.hs Modified
@@ -9,6 +9,7 @@ import Control.Monad ((<=<)) import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Reader (ReaderT) +import Data.Either (fromRight) import Data.Foldable (foldMap) import Data.Tagged import Data.Text (Text) @@ -83,7 +84,7 @@ lookupTree (commitTree head) >>= listTreeEntries getDescription :: FilePath -> IO String -getDescription path = either (const "") id <$> tryIOError (readFile path) +getDescription path = fromRight "" <$> tryIOError (readFile path) package description commits tree = HashMap.fromList [ ("commits", "commits")