ghcide-2.7.0.0: The core of an IDE
Safe HaskellSafe-Inferred
LanguageGHC2021

Development.IDE.GHC.Compat.CmdLine

Description

Compat module Interface file relevant code.

Synopsis

Documentation

processCmdLineP #

Arguments

:: 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.

newtype CmdLineP s a #

Constructors

CmdLineP (forall (m :: Type -> Type). Monad m => StateT s m a) 

Instances

Instances details
Applicative (CmdLineP s) 
Instance details

Defined in GHC.Driver.Session

Methods

pure :: a -> CmdLineP s a #

(<*>) :: CmdLineP s (a -> b) -> CmdLineP s a -> CmdLineP s b #

liftA2 :: (a -> b -> c) -> CmdLineP s a -> CmdLineP s b -> CmdLineP s c #

(*>) :: CmdLineP s a -> CmdLineP s b -> CmdLineP s b #

(<*) :: CmdLineP s a -> CmdLineP s b -> CmdLineP s a #

Functor (CmdLineP s) 
Instance details

Defined in GHC.Driver.Session

Methods

fmap :: (a -> b) -> CmdLineP s a -> CmdLineP s b #

(<$) :: a -> CmdLineP s b -> CmdLineP s a #

Monad (CmdLineP s) 
Instance details

Defined in GHC.Driver.Session

Methods

(>>=) :: CmdLineP s a -> (a -> CmdLineP s b) -> CmdLineP s b #

(>>) :: CmdLineP s a -> CmdLineP s b -> CmdLineP s b #

return :: a -> CmdLineP s a #

data Flag (m :: Type -> Type) #

Constructors

Flag 

data OptKind (m :: Type -> Type) #

Constructors

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 #

Instances

Instances details
MonadIO m => MonadIO (EwM m) 
Instance details

Defined in GHC.Driver.CmdLine

Methods

liftIO :: IO a -> EwM m a #

Monad m => Applicative (EwM m) 
Instance details

Defined in GHC.Driver.CmdLine

Methods

pure :: a -> EwM m a #

(<*>) :: EwM m (a -> b) -> EwM m a -> EwM m b #

liftA2 :: (a -> b -> c) -> EwM m a -> EwM m b -> EwM m c #

(*>) :: EwM m a -> EwM m b -> EwM m b #

(<*) :: EwM m a -> EwM m b -> EwM m a #

Functor m => Functor (EwM m) 
Instance details

Defined in GHC.Driver.CmdLine

Methods

fmap :: (a -> b) -> EwM m a -> EwM m b #

(<$) :: a -> EwM m b -> EwM m a #

Monad m => Monad (EwM m) 
Instance details

Defined in GHC.Driver.CmdLine

Methods

(>>=) :: EwM m a -> (a -> EwM m b) -> EwM m b #

(>>) :: EwM m a -> EwM m b -> EwM m b #

return :: a -> EwM m a #

defFlag :: forall (m :: Type -> Type). String -> OptKind m -> Flag m #

liftEwM :: Monad m => m a -> EwM m a #