ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.SysTools.Cpp

Synopsis

- doCpp :: Logger -> TmpFs -> DynFlags -> UnitEnv -> CppOpts -> FilePath -> FilePath -> IO ()
- data CppOpts = CppOpts {
  - cppUseCc :: !Bool
  - cppLinePragmas :: !Bool
  }
- getGhcVersionPathName :: DynFlags -> UnitEnv -> IO FilePath
- applyCDefs :: DefunctionalizedCDefs -> Logger -> DynFlags -> IO [String]
- offsetIncludePaths :: DynFlags -> IncludeSpecs -> IncludeSpecs

# Documentation

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

Run CPP

UnitEnv is needed to compute MIN_VERSION macros

data CppOpts Source #

Constructors

CppOpts |

Fields

- cppUseCc :: !Bool

  Use "cc -E" as preprocessor, otherwise use "cpp"

- cppLinePragmas :: !Bool

  Enable generation of LINE pragmas

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

Find out path to `ghcversion.h` file

applyCDefs :: DefunctionalizedCDefs -> Logger -> DynFlags -> IO [String] Source #

offsetIncludePaths :: DynFlags -> IncludeSpecs -> IncludeSpecs Source #