    module Data.GI.GIR.Signal
        ( Signal(..)
        , parseSignal
        ) where

    import Data.Text (Text)

    import Data.GI.GIR.Callable (Callable(..), parseCallable)
    import Data.GI.GIR.Parser

    data Signal = Signal {
            Signal -> ParseError
    sigName :: Text,
            Signal -> Callable
    sigCallable :: Callable,
            Signal -> Maybe DeprecationInfo
    sigDeprecated :: Maybe DeprecationInfo,
            Signal -> Bool
    sigDetailed :: Bool,
            Signal -> Documentation
    sigDoc :: Documentation
        } deriving (Int -> Signal -> ShowS
    [Signal] -> ShowS
    Signal -> String
    (Int -> Signal -> ShowS)
    -> (Signal -> String) -> ([Signal] -> ShowS) -> Show Signal
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Signal -> ShowS
    showsPrec :: Int -> Signal -> ShowS
    $cshow :: Signal -> String
    show :: Signal -> String
    $cshowList :: [Signal] -> ShowS
    showList :: [Signal] -> ShowS
    Show, Signal -> Signal -> Bool
    (Signal -> Signal -> Bool)
    -> (Signal -> Signal -> Bool) -> Eq Signal
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Signal -> Signal -> Bool
    == :: Signal -> Signal -> Bool
    $c/= :: Signal -> Signal -> Bool
    /= :: Signal -> Signal -> Bool
    Eq)

    parseSignal :: Parser Signal
    parseSignal :: Parser Signal
    parseSignal = do
      n <- Name -> Parser ParseError
    getAttr Name
    "name"
      detailed <- optionalAttr "detailed" False parseBool
      deprecated <- parseDeprecation
      callable <- parseCallable
      doc <- parseDocumentation
      return $ Signal {
                    sigName = n
                  , sigCallable = callable
                  , sigDeprecated = deprecated
                  , sigDetailed = detailed
                  , sigDoc = doc
                  }