Remove more unnecessary uses of fromJust

This commit is contained in:
Joseph C. Sible 2020-02-08 23:48:36 -05:00
parent 61b073d507
commit 4fd8de058b
2 changed files with 7 additions and 7 deletions

View file

@ -2056,7 +2056,7 @@ readSimpleCommand = called "simple command" $ do
firstArgument <- ignoreProblemsOf . optionMaybe . try . lookAhead $ readCmdWord
suffix <- option [] $ getParser readCmdSuffix
-- If `export` or other modifier commands are called with `builtin` we have to look at the first argument
(if isCommand ["builtin"] cmd && isJust firstArgument then fromJust firstArgument else cmd) [
(if isCommand ["builtin"] cmd then fromMaybe cmd firstArgument else cmd) [
(["declare", "export", "local", "readonly", "typeset"], readModifierSuffix),
(["time"], readTimeSuffix),
(["let"], readLetSuffix),