    -- |
    -- Module: Options.Types
    -- License: MIT
    module Options.Types
    	( OptionDefinitions(..)
    	, Group(..)
    	, OptionKey(..)
    	, Location(..)
    	, OptionInfo(..)
    	) where

    data OptionDefinitions = OptionDefinitions [OptionInfo] [(String, [OptionInfo])]

    data Group = Group
    	{
    	  Group -> String
    groupName :: String

    	-- | A short title for the group, which is used when printing
    	-- @--help@ output.
    	, Group -> String
    groupTitle :: String

    	-- | A description of the group, which is used when printing
    	-- @--help@ output.
    	, Group -> String
    groupDescription :: String
    	}
    	deriving (Group -> Group -> Bool
    (Group -> Group -> Bool) -> (Group -> Group -> Bool) -> Eq Group
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: Group -> Group -> Bool
    $c/= :: Group -> Group -> Bool
    == :: Group -> Group -> Bool
    $c== :: Group -> Group -> Bool
    Eq, Int -> Group -> ShowS
    [Group] -> ShowS
    Group -> String
    (Int -> Group -> ShowS)
    -> (Group -> String) -> ([Group] -> ShowS) -> Show Group
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [Group] -> ShowS
    $cshowList :: [Group] -> ShowS
    show :: Group -> String
    $cshow :: Group -> String
    showsPrec :: Int -> Group -> ShowS
    $cshowsPrec :: Int -> Group -> ShowS
    Show)

    data OptionKey
    	= OptionKey String
    	| OptionKeyHelpSummary
    	| OptionKeyHelpGroup String
    	| OptionKeyGenerated Integer
    	| OptionKeyIgnored
    	deriving (OptionKey -> OptionKey -> Bool
    (OptionKey -> OptionKey -> Bool)
    -> (OptionKey -> OptionKey -> Bool) -> Eq OptionKey
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: OptionKey -> OptionKey -> Bool
    $c/= :: OptionKey -> OptionKey -> Bool
    == :: OptionKey -> OptionKey -> Bool
    $c== :: OptionKey -> OptionKey -> Bool
    Eq, Eq OptionKey
    Eq OptionKey =>
    (OptionKey -> OptionKey -> Ordering)
    -> (OptionKey -> OptionKey -> Bool)
    -> (OptionKey -> OptionKey -> Bool)
    -> (OptionKey -> OptionKey -> Bool)
    -> (OptionKey -> OptionKey -> Bool)
    -> (OptionKey -> OptionKey -> OptionKey)
    -> (OptionKey -> OptionKey -> OptionKey)
    -> Ord OptionKey
    OptionKey -> OptionKey -> Bool
    OptionKey -> OptionKey -> Ordering
    OptionKey -> OptionKey -> OptionKey
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    min :: OptionKey -> OptionKey -> OptionKey
    $cmin :: OptionKey -> OptionKey -> OptionKey
    max :: OptionKey -> OptionKey -> OptionKey
    $cmax :: OptionKey -> OptionKey -> OptionKey
    >= :: OptionKey -> OptionKey -> Bool
    $c>= :: OptionKey -> OptionKey -> Bool
    > :: OptionKey -> OptionKey -> Bool
    $c> :: OptionKey -> OptionKey -> Bool
    <= :: OptionKey -> OptionKey -> Bool
    $c<= :: OptionKey -> OptionKey -> Bool
    < :: OptionKey -> OptionKey -> Bool
    $c< :: OptionKey -> OptionKey -> Bool
    compare :: OptionKey -> OptionKey -> Ordering
    $ccompare :: OptionKey -> OptionKey -> Ordering
    $cp1Ord :: Eq OptionKey
    Ord, Int -> OptionKey -> ShowS
    [OptionKey] -> ShowS
    OptionKey -> String
    (Int -> OptionKey -> ShowS)
    -> (OptionKey -> String)
    -> ([OptionKey] -> ShowS)
    -> Show OptionKey
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [OptionKey] -> ShowS
    $cshowList :: [OptionKey] -> ShowS
    show :: OptionKey -> String
    $cshow :: OptionKey -> String
    showsPrec :: Int -> OptionKey -> ShowS
    $cshowsPrec :: Int -> OptionKey -> ShowS
    Show)

    data Location = Location
    	{ Location -> String
    locationPackage :: String
    	, Location -> String
    locationModule :: String
    	, Location -> String
    locationFilename :: String
    	, Location -> Integer
    locationLine :: Integer
    	}
    	deriving (Location -> Location -> Bool
    (Location -> Location -> Bool)
    -> (Location -> Location -> Bool) -> Eq Location
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: Location -> Location -> Bool
    $c/= :: Location -> Location -> Bool
    == :: Location -> Location -> Bool
    $c== :: Location -> Location -> Bool
    Eq, Int -> Location -> ShowS
    [Location] -> ShowS
    Location -> String
    (Int -> Location -> ShowS)
    -> (Location -> String) -> ([Location] -> ShowS) -> Show Location
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [Location] -> ShowS
    $cshowList :: [Location] -> ShowS
    show :: Location -> String
    $cshow :: Location -> String
    showsPrec :: Int -> Location -> ShowS
    $cshowsPrec :: Int -> Location -> ShowS
    Show)

    data OptionInfo = OptionInfo
    	{ OptionInfo -> OptionKey
    optionInfoKey :: OptionKey
    	, OptionInfo -> String
    optionInfoShortFlags :: [Char]
    	, OptionInfo -> [String]
    optionInfoLongFlags :: [String]
    	, OptionInfo -> String
    optionInfoDefault :: String
    	, OptionInfo -> Bool
    optionInfoUnary :: Bool
    	, OptionInfo -> Bool
    optionInfoUnaryOnly :: Bool  -- used only for --help and friends
    	, OptionInfo -> String
    optionInfoDescription :: String
    	, OptionInfo -> Maybe Group
    optionInfoGroup :: Maybe Group
    	, OptionInfo -> Maybe Location
    optionInfoLocation :: Maybe Location
    	, OptionInfo -> String
    optionInfoTypeName :: String
    	}
    	deriving (OptionInfo -> OptionInfo -> Bool
    (OptionInfo -> OptionInfo -> Bool)
    -> (OptionInfo -> OptionInfo -> Bool) -> Eq OptionInfo
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    /= :: OptionInfo -> OptionInfo -> Bool
    $c/= :: OptionInfo -> OptionInfo -> Bool
    == :: OptionInfo -> OptionInfo -> Bool
    $c== :: OptionInfo -> OptionInfo -> Bool
    Eq, Int -> OptionInfo -> ShowS
    [OptionInfo] -> ShowS
    OptionInfo -> String
    (Int -> OptionInfo -> ShowS)
    -> (OptionInfo -> String)
    -> ([OptionInfo] -> ShowS)
    -> Show OptionInfo
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    showList :: [OptionInfo] -> ShowS
    $cshowList :: [OptionInfo] -> ShowS
    show :: OptionInfo -> String
    $cshow :: OptionInfo -> String
    showsPrec :: Int -> OptionInfo -> ShowS
    $cshowsPrec :: Int -> OptionInfo -> ShowS
    Show)