ghc-9.4.4: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Driver.Pipeline.Execute

Synopsis

Documentation

newtype HookedUse a Source #

Constructors

HookedUse 

Fields

Instances

Instances details
MonadIO HookedUse Source # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

Methods

liftIO :: IO a -> HookedUse a Source #

Applicative HookedUse Source # 
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 Source # 
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 Source # 
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 #

MonadCatch HookedUse Source # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

Methods

catch :: Exception e => HookedUse a -> (e -> HookedUse a) -> HookedUse a Source #

MonadThrow HookedUse Source # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

Methods

throwM :: Exception e => e -> HookedUse a Source #

MonadUse TPhase HookedUse Source # 
Instance details

Defined in GHC.Driver.Pipeline.Execute

Methods

use :: TPhase a -> HookedUse a Source #

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

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

runPhase :: TPhase out -> IO out Source #

Default interpretation of each phase, in terms of IO.

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

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 Source #

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 Source #

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 Source #

Arguments

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

doCpp :: Logger -> TmpFs -> DynFlags -> UnitEnv -> Bool -> FilePath -> FilePath -> IO () Source #

Run CPP

UnitEnv is needed to compute MIN_VERSION macros

hscPostBackendPhase :: HscSource -> Backend -> Phase Source #

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

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

See Note [Object merging].

getGhcVersionPathName :: DynFlags -> UnitEnv -> IO FilePath Source #

Find out path to ghcversion.h file