ghc-6.12.1: The GHC APISource codeContentsIndex
HeaderInfo
Description

Parsing the top of a Haskell source file to get its module name, imports and options.

(c) Simon Marlow 2005 (c) Lemmih 2006

Synopsis
getImports :: GhcMonad m => DynFlags -> StringBuffer -> FilePath -> FilePath -> m ([Located (ImportDecl RdrName)], [Located (ImportDecl RdrName)], Located ModuleName)
getOptionsFromFile :: DynFlags -> FilePath -> IO [Located String]
getOptions :: DynFlags -> StringBuffer -> FilePath -> [Located String]
optionsErrorMsgs :: [String] -> [Located String] -> FilePath -> Messages
checkProcessArgsResult :: MonadIO m => [Located String] -> m ()
Documentation
getImportsSource
:: GhcMonad m
=> DynFlagsParse this.
-> StringBufferFilename the buffer came from. Used for reporting parse error locations.
-> FilePathThe original source filename (used for locations in the function result)
-> FilePathThe source imports, normal imports, and the module name.
-> m ([Located (ImportDecl RdrName)], [Located (ImportDecl RdrName)], Located ModuleName)

Parse the imports of a source file.

Throws a SourceError if parsing fails.

getOptionsFromFileSource
:: DynFlags
-> FilePathInput file
-> IO [Located String]Parsed options, if any.

Parse OPTIONS and LANGUAGE pragmas of the source file.

Throws a SourceError if flag parsing fails (including unsupported flags.)

getOptionsSource
:: DynFlags
-> StringBufferInput Buffer
-> FilePathSource filename. Used for location info.
-> [Located String]Parsed options.

Parse OPTIONS and LANGUAGE pragmas of the source file.

Throws a SourceError if flag parsing fails (including unsupported flags.)

optionsErrorMsgs :: [String] -> [Located String] -> FilePath -> MessagesSource
checkProcessArgsResult :: MonadIO m => [Located String] -> m ()Source

Complain about non-dynamic flags in OPTIONS pragmas.

Throws a SourceError if the input list is non-empty claiming that the input flags are unknown.

Produced by Haddock version 2.6.0