diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-10 02:03:03 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-10 02:03:03 -0400 |
commit | ccd76ebf641ad481e549da97c85f73101a3149fd (patch) | |
tree | 254f0d644e4998ff73046de74fa4fa4f91735ec8 /Types | |
parent | 56c0bf6c690ffddc4ac561393f4cd21d087b7ddb (diff) |
wired up global options
Note that I ran into a problem where parsing the global options looped
forever, eating memory. It was somehow caused by stacking
combineGlobalSetters inside a combineGlobalSetters. Maybe due to both
using "many"? Anyway, changed things to avoid that.
Diffstat (limited to 'Types')
-rw-r--r-- | Types/DeferredParse.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Types/DeferredParse.hs b/Types/DeferredParse.hs index 4c6e90175..c11b722bf 100644 --- a/Types/DeferredParse.hs +++ b/Types/DeferredParse.hs @@ -46,6 +46,6 @@ globalFlag setter = flag' (DeferredParse setter) globalSetter :: (v -> Annex ()) -> Parser v -> Parser GlobalSetter globalSetter setter parser = DeferredParse . setter <$> parser -globalSetters :: [Parser GlobalSetter] -> Parser GlobalSetter -globalSetters l = DeferredParse . sequence_ . map getParsed +combineGlobalSetters :: [Parser GlobalSetter] -> Parser GlobalSetter +combineGlobalSetters l = DeferredParse . sequence_ . map getParsed <$> many (foldl1 (<|>) l) |