Skip to content

Commit

Permalink
Remove redundant usage of tryP.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcapriotti committed Dec 23, 2012
1 parent e7cc156 commit 6f2a01d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Options/Applicative/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ optMatches disambiguate opt arg = case opt of
CmdReader _ f ->
flip fmap (f arg) $ \subp args -> do
setContext (Just arg) subp
x <- tryP $ runParser (infoParser subp) args
case x of
Left e -> errorP e
Right r -> return r
runParser (infoParser subp) args
where
parsed =
case arg of
Expand Down

0 comments on commit 6f2a01d

Please sign in to comment.