Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Compat module Interface file relevant code.
Synopsis
- processCmdLineP :: forall s m. MonadIO m => [Flag (CmdLineP s)] -> s -> [Located String] -> m (([Located String], [Err], [Warn]), s)
- newtype CmdLineP s a = CmdLineP (forall (m :: Type -> Type). Monad m => StateT s m a)
- getCmdLineState :: CmdLineP s s
- putCmdLineState :: s -> CmdLineP s ()
- data Flag (m :: Type -> Type) = Flag {
- flagName :: String
- flagOptKind :: OptKind m
- flagGhcMode :: GhcFlagMode
- data OptKind (m :: Type -> Type)
- = NoArg (EwM m ())
- | HasArg (String -> EwM m ())
- | SepArg (String -> EwM m ())
- | Prefix (String -> EwM m ())
- | OptPrefix (String -> EwM m ())
- | OptIntSuffix (Maybe Int -> EwM m ())
- | IntSuffix (Int -> EwM m ())
- | WordSuffix (Word -> EwM m ())
- | FloatSuffix (Float -> EwM m ())
- | PassFlag (String -> EwM m ())
- | AnySuffix (String -> EwM m ())
- data EwM (m :: Type -> Type) a
- defFlag :: forall (m :: Type -> Type). String -> OptKind m -> Flag m
- liftEwM :: Monad m => m a -> EwM m a
Documentation
:: forall s m. MonadIO m | |
=> [Flag (CmdLineP s)] | valid flags to match against |
-> s | current state |
-> [Located String] | arguments to parse |
-> m (([Located String], [Err], [Warn]), s) | (leftovers, errors, warnings) |
A helper to parse a set of flags from a list of command-line arguments, handling response files.
Instances
Applicative (CmdLineP s) | |
Defined in GHC.Driver.Session | |
Functor (CmdLineP s) | |
Monad (CmdLineP s) | |
getCmdLineState :: CmdLineP s s #
putCmdLineState :: s -> CmdLineP s () #
data Flag (m :: Type -> Type) #
Flag | |
|
data OptKind (m :: Type -> Type) #
NoArg (EwM m ()) | |
HasArg (String -> EwM m ()) | |
SepArg (String -> EwM m ()) | |
Prefix (String -> EwM m ()) | |
OptPrefix (String -> EwM m ()) | |
OptIntSuffix (Maybe Int -> EwM m ()) | |
IntSuffix (Int -> EwM m ()) | |
WordSuffix (Word -> EwM m ()) | |
FloatSuffix (Float -> EwM m ()) | |
PassFlag (String -> EwM m ()) | |
AnySuffix (String -> EwM m ()) |