minor refactor to app/Util.hs to make hlint happy
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
## current
|
## current
|
||||||
|
|
||||||
- minor UI tweak
|
- minor UI tweak
|
||||||
|
- minor refactoring
|
||||||
|
|
||||||
## 0.3.1.1
|
## 0.3.1.1
|
||||||
|
|
||||||
|
|||||||
@@ -105,9 +105,9 @@ confirm :: String -> Request Bool
|
|||||||
confirm x = prompt (x ++ " (y/n): ") $ reqAgree Nothing $ fmap return reqChar
|
confirm x = prompt (x ++ " (y/n): ") $ reqAgree Nothing $ fmap return reqChar
|
||||||
|
|
||||||
loadFrom :: FilePath -> Request PWDatabase
|
loadFrom :: FilePath -> Request PWDatabase
|
||||||
loadFrom path = reqDefault
|
loadFrom path = fromMaybe newPWDatabase <$> reqDefault
|
||||||
(reqIO (decodeFileStrict path))
|
(reqIO (decodeFileStrict path))
|
||||||
(Just newPWDatabase) >>= (return . fromMaybe newPWDatabase)
|
(Just newPWDatabase)
|
||||||
|
|
||||||
save :: S.StateT Status IO ()
|
save :: S.StateT Status IO ()
|
||||||
save = do
|
save = do
|
||||||
|
|||||||
Reference in New Issue
Block a user