    -- | Parsing of bitfields, a.k.a. flags. They are represented in the
    -- same way as enums, so this is a thin wrapper over that code.
    module Data.GI.GIR.Flags
        ( Flags(..)
        , parseFlags
        ) where

    import Data.GI.GIR.Enum (Enumeration, parseEnum)
    import Data.GI.GIR.Parser

    data Flags = Flags Enumeration
        deriving Int -> Flags -> ShowS
    [Flags] -> ShowS
    Flags -> String
    (Int -> Flags -> ShowS)
    -> (Flags -> String) -> ([Flags] -> ShowS) -> Show Flags
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Flags -> ShowS
    showsPrec :: Int -> Flags -> ShowS
    $cshow :: Flags -> String
    show :: Flags -> String
    $cshowList :: [Flags] -> ShowS
    showList :: [Flags] -> ShowS
    Show

    parseFlags :: Parser (Name, Flags)
    parseFlags :: Parser (Name, Flags)
    parseFlags = do
      (n, enum) <- Parser (Name, Enumeration)
    parseEnum
      return (n, Flags enum)