File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ libName (Cabal (g@(Section _ _ gs):ss)) = Cabal $ g : map set ss
5151reduce :: FlagInfo -> Cabal -> Cabal
5252reduce info c = reduce' (addFlags c) c
5353 where addFlags (Cabal ss) = info{ flags = flags info ++ concatMap sect ss }
54- sect (Section " flag" n fs) = [(n' , dflt n' fs)] where n' = map toLower n
54+ sect (Section " flag" n fs) = [(map toLower n , dflt fs)]
5555 sect _ = []
56- dflt n fs = head $ [ b | Field " default" (VBool b) <- fs ] ++ [error $ " no default for flag " ++ show n ]
56+ dflt fs = head $ [ b | Field " default" (VBool b) <- fs ] ++ [True ]
5757
5858reduce' :: FlagInfo -> Cabal -> Cabal
5959reduce' info = mapField red
Original file line number Diff line number Diff line change @@ -440,20 +440,21 @@ parsers =
440440 , " name" # (VItem <$> pItem)
441441 , " package-url" # (VItem <$> pItem)
442442 , " stability" # pFreeText
443- , " subdir" # (VItem <$> pItem)
444443 , " synopsis" # pFreeTextX
445444 , " tested-with" # pVLibs
446445 , " version" # (VVersion <$> pVersion)
447446 -- test suite fields
448447 , " main-is" # (VItem <$> pItem)
449448 , " test-module" # (VItem <$> pItem)
450- , " type" # (VItem <$> pItem)
451449 -- source-repository fields
452450 , " location" # (VItem <$> pItem)
451+ , " module" # (VItem <$> pItem)
452+ , " branch" # (VItem <$> pItem)
453+ , " tag" # (VItem <$> pItem)
454+ , " subdir" # (VItem <$> pItem)
453455 -- flag fields
454456 , " manual" # (VBool <$> pBoolNL)
455457 , " default" # (VBool <$> pBoolNL)
456- , " tag" # pFreeText
457458 ]
458459 where ( # ) = (,)
459460 -- XXX use local fixity
You can’t perform that action at this time.
0 commit comments