avoid using MonadFail in ParseDuration

There's no instance for Either String, so that makes it not as useful as
it could be, so instead just return an Either String.
This commit is contained in:
Joey Hess 2020-08-15 15:53:35 -04:00
parent ad64079b44
commit 4c58433c48
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 13 additions and 15 deletions

View file

@ -39,7 +39,7 @@ optParser _ = AssistantOptions
( long "autostart"
<> help "start in known repositories"
)
<*> optional (option (str >>= parseDuration)
<*> optional (option (eitherReader parseDuration)
( long "startdelay" <> metavar paramNumber
<> help "delay before running startup scan"
))