Add modifier for disambiguate option.

This commit is contained in:
Paolo Capriotti 2012-08-05 02:10:09 +01:00
parent 4f3108ad14
commit 0a2eedb50c

View File

@ -72,6 +72,7 @@ module Options.Applicative.Builder (
-- * Builder for 'ParserPrefs'
PrefsMod,
multiSuffix,
disambiguate,
prefs
) where
@ -418,6 +419,9 @@ instance Monoid PrefsMod where
multiSuffix :: String -> PrefsMod
multiSuffix s = PrefsMod $ \p -> p { prefMultiSuffix = s }
disambiguate :: PrefsMod
disambiguate = PrefsMod $ \p -> p { prefDisambiguate = True }
prefs :: PrefsMod -> ParserPrefs
prefs m = applyPrefsMod m base
where