ghc-lib-parser-9.12.2.20250421: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Driver.Pipeline.Monad

Description

The `TPipelineClass` and `MonadUse` classes and associated types

Synopsis

- type TPipelineClass (f :: Type -> Type) (m :: Type -> Type) = (Functor m, MonadIO m, Applicative m, Monad m, MonadUse f m)
- class MonadUse (f :: k -> Type) (m :: k -> Type) where
  - use :: forall (a :: k). f a -> m a
- data PipeEnv = PipeEnv {
  - stop_phase :: StopPhase
  - src_filename :: String
  - src_basename :: String
  - src_suffix :: String
  - start_phase :: Phase
  - output_spec :: PipelineOutput
  }
- data PipelineOutput
  - = Temporary TempFileLifetime
  - | Persistent
  - | SpecificFile
  - | NoOutputFile

# Documentation

type TPipelineClass (f :: Type -> Type) (m :: Type -> Type) = (Functor m, MonadIO m, Applicative m, Monad m, MonadUse f m) Source #

class MonadUse (f :: k -> Type) (m :: k -> Type) where Source #

Lift a `f` action into an `m` action.

Methods

use :: forall (a :: k). f a -> m a Source #

data PipeEnv Source #

Constructors

PipeEnv |

Fields

- stop_phase :: StopPhase

  Stop just after this phase

- src_filename :: String

  basename of original input source

- src_basename :: String

  basename of original input source

- src_suffix :: String

  its extension

- start_phase :: Phase
- output_spec :: PipelineOutput

  says where to put the pipeline output

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.
NoOutputFile | No output should be created, like in Interpreter or NoBackend.

#### Instances

Instances details

Show PipelineOutput Source # |
Instance details Defined in GHC.Driver.Pipeline.Monad Methods showsPrec :: Int -> PipelineOutput -> ShowS Source # show :: PipelineOutput -> String Source # showList :: [PipelineOutput] -> ShowS Source #