Commit 759165bd351f359e5df08979785dec4beddc8222 Parent: 09f8f52648c2b4f141426296ce9377242391fba5 Author: mcol <mcol@posteo.net> Date: 2021-09-24 22:56:01 +0100 Committer: mcol <mcol@posteo.net> Committed: 2021-09-24 23:12:10 +0100 Remove redundant bind
src/Templates.hs Modified
@@ -10,7 +10,7 @@ import Control.Monad (filterM, (<=<)) import Data.Char (toLower) -import Data.Either (rights, either) +import Data.Either (rights) import Data.List (isSuffixOf) import Data.Text (unpack, Text) import qualified Data.HashMap.Strict as HashMap @@ -62,7 +62,7 @@ includes. -} includeResolver :: FilePath -> IO (Maybe String) -includeResolver path = return . either (const Nothing) Just =<< tryIOError (readFile path) +includeResolver path = either (const Nothing) Just <$> tryIOError (readFile path) {- This is used to filter files in the template directory so that we only try to load