{-# LANGUAGE DeriveDataTypeable #-}-- | The underlying CmdArgs type.moduleSystem.Console.CmdArgs.Implicit.Type(-- cmdArgs_privateArgsSeen is exported, otherwise Haddock-- gets confused when using RecordWildCardsCmdArgs(..),cmdArgsHasValue,embed,reembed,CmdArgsPrivate,incArgsSeen,getArgsSeen)whereimportSystem.Console.CmdArgs.VerbosityimportData.DataimportData.Maybe-- | A structure to store the additional data relating to @--help@,-- @--version@, @--quiet@ and @--verbose@.dataCmdArgsa=CmdArgs{cmdArgsValue::a-- ^ The underlying value being wrapped.,cmdArgsHelp::MaybeString-- ^ @Just@ if @--help@ is given, then gives the help message for display, including a trailing newline.,cmdArgsVersion::MaybeString-- ^ @Just@ if @--version@ is given, then gives the version message for display, including a trailing newline.,cmdArgsVerbosity::MaybeVerbosity-- ^ @Just@ if @--quiet@ or @--verbose@ is given, then gives the verbosity to use.,cmdArgsPrivate::CmdArgsPrivate-- ^ Private: Only exported due to Haddock limitations.}deriving(Show,Eq,Ord,Data,Typeable)cmdArgsHasValue::CmdArgsa->BoolcmdArgsHasValuex=isNothing(cmdArgsHelpx)&&isNothing(cmdArgsVersionx)instanceFunctorCmdArgswherefmapfx=x{cmdArgsValue=f$cmdArgsValuex}embed::a->CmdArgsaembedx=CmdArgsxNothingNothingNothing(CmdArgsPrivate0)reembed::CmdArgsa->(a,a->CmdArgsa)reembedx=(cmdArgsValuex,\y->x{cmdArgsValue=y})dataCmdArgsPrivate=CmdArgsPrivateInt-- ^ The number of arguments that have been seenderiving(Eq,Ord,Data,Typeable)incArgsSeenx@CmdArgs{cmdArgsPrivate=CmdArgsPrivatei}=x{cmdArgsPrivate=CmdArgsPrivate(i+1)}getArgsSeenCmdArgs{cmdArgsPrivate=CmdArgsPrivatei}=iinstanceShowCmdArgsPrivatewhereshow_="CmdArgsPrivate"