ghc-exactprint-0.4.0.0: ExactPrint for GHC

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.GHC.ExactPrint.Preprocess

Description

This module provides support for CPP, interpreter directives and line pragmas.

Synopsis

Documentation

stripLinePragmas :: String -> (String, [Comment]) Source

Remove GHC style line pragams ({--}) and convert them into comments.

getCppTokensAsComments Source

Arguments

:: GhcMonad m 
=> CppOptions

Preprocessor Options

-> FilePath

Path to source file

-> m [Comment] 

Replacement for original getRichTokenStream which will return the tokens for a file processed by CPP. See bug http://ghc.haskell.org/trac/ghc/ticket/8265

data CppOptions Source

Constructors

CppOptions 

Fields

cppDefine :: [String]

CPP #define macros

cppInclude :: [FilePath]

CPP Includes directory

cppFile :: [FilePath]

CPP pre-include file