ghc-9.14.0.20251128: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Driver.Pipeline.Execute

Synopsis

Documentation

newtype HookedUse a #

Constructors

HookedUse 

Fields

Instances

Instances details
MonadCatch HookedUse # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

MonadThrow HookedUse # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

Applicative HookedUse # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

Methods

pure :: a -> HookedUse a Source #

(<*>) :: HookedUse (a -> b) -> HookedUse a -> HookedUse b Source #

liftA2 :: (a -> b -> c) -> HookedUse a -> HookedUse b -> HookedUse c Source #

(*>) :: HookedUse a -> HookedUse b -> HookedUse b Source #

(<*) :: HookedUse a -> HookedUse b -> HookedUse a Source #

Functor HookedUse # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

Methods

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

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

Monad HookedUse # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

Methods

(>>=) :: HookedUse a -> (a -> HookedUse b) -> HookedUse b Source #

(>>) :: HookedUse a -> HookedUse b -> HookedUse b Source #

return :: a -> HookedUse a Source #

MonadIO HookedUse # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

Methods

liftIO :: IO a -> HookedUse a Source #

MonadUse TPhase HookedUse # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

Methods

use :: TPhase a -> HookedUse a #

runPipeline :: Hooks -> HookedUse a -> IO a #

The default mechanism to run a pipeline, see Note [The Pipeline Monad]

runPhase :: TPhase out -> IO out #

Default interpretation of each phase, in terms of IO.

runJsPhase :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> IO FilePath #

Run the JS Backend postHsc phase.

runForeignJsPhase :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> IO FilePath #

Deal with foreign JS files (embed them into .o files)

mkOneShotModLocation :: PipeEnv -> DynFlags -> HscSource -> ModuleName -> IO ModLocation #

Calculate the ModLocation from the provided DynFlags. This function is only used in one-shot mode and therefore takes into account the effect of -o/-ohi flags (which do nothing in --make mode)

phaseOutputFilenameNew #

Arguments

:: Phase

The next phase

-> PipeEnv 
-> HscEnv 
-> Maybe ModLocation

A ModLocation, if we are compiling a Haskell source file

-> IO FilePath 

getOutputFilename :: Logger -> TmpFs -> Phase -> PipelineOutput -> String -> DynFlags -> Phase -> Maybe ModLocation -> IO FilePath #

Computes the next output filename for something in the compilation pipeline. This is controlled by several variables:

  1. Phase: the last phase to be run (e.g. stopPhase). This is used to tell if we're in the last phase or not, because in that case flags like -o may be important.
  2. PipelineOutput: is this intended to be a Temporary or Persistent build output? Temporary files just go in a fresh temporary name.
  3. String: what was the basename of the original input file?
  4. DynFlags: the obvious thing
  5. Phase: the phase we want to determine the output filename of.
  6. Maybe ModLocation: the ModLocation of the module we're compiling; this can be used to override the default output of an object file. (TODO: do we actually need this?)

llvmOptions #

Arguments

:: LlvmConfig 
-> DynFlags 
-> [(String, String)]

pairs of (opt, llc) arguments

LLVM Options. These are flags to be passed to opt and llc, to ensure consistency we list them in pairs, so that they form groups.

hscPostBackendPhase :: HscSource -> Backend -> Phase #

What phase to run after one of the backend code generators has run

joinObjectFiles :: HscEnv -> [FilePath] -> FilePath -> IO () #

See Note [Object merging].