ghc-9.0.0.20201227: The GHC API
Safe HaskellNone
LanguageHaskell2010

GHC.Driver.Pipeline.Monad

Description

The CompPipeline monad and associated ops

Defined in separate module so that it can safely be imported from Hooks

Documentation

newtype CompPipeline a Source #

Constructors

P 

Fields

Instances

Instances details
Monad CompPipeline # 
Instance details

Defined in GHC.Driver.Pipeline.Monad

Functor CompPipeline # 
Instance details

Defined in GHC.Driver.Pipeline.Monad

Methods

fmap :: (a -> b) -> CompPipeline a -> CompPipeline b Source #

(<$) :: a -> CompPipeline b -> CompPipeline a Source #

Applicative CompPipeline # 
Instance details

Defined in GHC.Driver.Pipeline.Monad

MonadIO CompPipeline # 
Instance details

Defined in GHC.Driver.Pipeline.Monad

Methods

liftIO :: IO a -> CompPipeline a Source #

HasDynFlags CompPipeline # 
Instance details

Defined in GHC.Driver.Pipeline.Monad

data PhasePlus Source #

Instances

Instances details
Outputable PhasePlus # 
Instance details

Defined in GHC.Driver.Pipeline.Monad

data PipeEnv Source #

Constructors

PipeEnv 

Fields

data PipeState Source #

Constructors

PipeState 

Fields

  • hsc_env :: HscEnv

    only the DynFlags change in the HscEnv. The DynFlags change at various points, for example when we read the OPTIONS_GHC pragmas in the Cpp phase.

  • maybe_loc :: Maybe ModLocation

    the ModLocation. This is discovered during compilation, in the Hsc phase where we read the module header.

  • foreign_os :: [FilePath]

    additional object files resulting from compiling foreign code. They come from two sources: foreign stubs, and add{C,Cxx,Objc,Objcxx}File from template haskell

  • iface :: Maybe (ModIface, ModDetails)

    Interface generated by HscOut phase. Only available after the phase runs.

data PipelineOutput Source #

Constructors

Temporary TempFileLifetime

Output should be to a temporary file: we're going to run more compilation steps on this output later.

Persistent

We want a persistent file, i.e. a file in the current directory derived from the input filename, but with the appropriate extension. eg. in "ghc -c Foo.hs" the output goes into ./Foo.o.

SpecificFile

The output must go into the specific outputFile in DynFlags. We don't store the filename in the constructor as it changes when doing -dynamic-too.

Instances

Instances details
Show PipelineOutput # 
Instance details

Defined in GHC.Driver.Pipeline.Monad