From 85920c26a04c53de8128e5ece733d9e2a746053a Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Thu, 4 May 2023 14:47:20 -0400 Subject: [PATCH] minor refactor to app/Util.hs to make hlint happy --- ChangeLog.md | 1 + app/Util.hs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 0a6bbae..eafc76f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -3,6 +3,7 @@ ## current - minor UI tweak +- minor refactoring ## 0.3.1.1 diff --git a/app/Util.hs b/app/Util.hs index 52cab11..cd29fe2 100644 --- a/app/Util.hs +++ b/app/Util.hs @@ -105,9 +105,9 @@ confirm :: String -> Request Bool confirm x = prompt (x ++ " (y/n): ") $ reqAgree Nothing $ fmap return reqChar loadFrom :: FilePath -> Request PWDatabase -loadFrom path = reqDefault +loadFrom path = fromMaybe newPWDatabase <$> reqDefault (reqIO (decodeFileStrict path)) - (Just newPWDatabase) >>= (return . fromMaybe newPWDatabase) + (Just newPWDatabase) save :: S.StateT Status IO () save = do