| Safe Haskell | None |
|---|
Language.Haskell.GhcMod
Description
The ghc-mod library.
- data Cradle = Cradle {}
- findCradle :: IO Cradle
- data Options = Options {
- outputStyle :: OutputStyle
- hlintOpts :: [String]
- ghcOpts :: [String]
- operators :: Bool
- detailed :: Bool
- expandSplice :: Bool
- lineSeparator :: LineSeparator
- newtype LineSeparator = LineSeparator String
- data OutputStyle
- = LispStyle
- | PlainStyle
- defaultOptions :: Options
- type ModuleString = String
- type Expression = String
- browseModule :: Options -> Cradle -> ModuleString -> IO String
- checkSyntax :: Options -> Cradle -> [FilePath] -> IO String
- lintSyntax :: Options -> FilePath -> IO String
- infoExpr :: Options -> Cradle -> FilePath -> ModuleString -> Expression -> IO String
- typeExpr :: Options -> Cradle -> FilePath -> ModuleString -> Int -> Int -> IO String
- listModules :: Options -> Cradle -> IO String
- listLanguages :: Options -> IO String
- listFlags :: Options -> IO String
- debugInfo :: Options -> Cradle -> FilePath -> IO String
- withGHC :: Alternative m => FilePath -> Ghc (m a) -> IO (m a)
- withGHCDummyFile :: Alternative m => Ghc (m a) -> IO (m a)
- browse :: Options -> Cradle -> ModuleString -> Ghc [String]
- check :: Options -> Cradle -> [FilePath] -> Ghc [String]
- info :: Options -> Cradle -> FilePath -> ModuleString -> Expression -> Ghc String
- typeOf :: Options -> Cradle -> FilePath -> ModuleString -> Int -> Int -> Ghc String
- listMods :: Options -> Cradle -> Ghc [String]
- debug :: Options -> Cradle -> FilePath -> Ghc [String]
Cradle
The environment where this library is used.
Constructors
| Cradle | |
Fields
| |
Finding Cradle.
Find a cabal file by tracing ancestor directories.
Find a sandbox according to a cabal sandbox config
in a cabal directory.
Options
Constructors
| Options | |
Fields
| |
newtype LineSeparator Source
The type for line separator. Historically, a Null string is used.
Constructors
| LineSeparator String |
data OutputStyle Source
Output style.
Constructors
| LispStyle | S expression style. |
| PlainStyle | Plain textstyle. |
defaultOptions :: OptionsSource
A default Options.
Types
type ModuleString = StringSource
Module name.
type Expression = StringSource
Haskell expression.
IO utilities
Arguments
| :: Options | |
| -> Cradle | |
| -> ModuleString | A module name. (e.g. "Data.List") |
| -> IO String |
Checking syntax of a target file using GHC. Warnings and errors are returned.
Checking syntax of a target file using hlint. Warnings and errors are returned.
Arguments
| :: Options | |
| -> Cradle | |
| -> FilePath | A target file. |
| -> ModuleString | A module name. |
| -> Expression | A Haskell expression. |
| -> IO String |
Obtaining information of a target expression. (GHCi's info:)
Arguments
| :: Options | |
| -> Cradle | |
| -> FilePath | A target file. |
| -> ModuleString | A odule name. |
| -> Int | Line number. |
| -> Int | Column number. |
| -> IO String |
Obtaining type of a target expression. (GHCi's type:)
listLanguages :: Options -> IO StringSource
Listing language extensions.
Obtaining debug information.
Converting the Ghc monad to the IO monad
Arguments
| :: Alternative m | |
| => FilePath | A target file displayed in an error message. |
| -> Ghc (m a) |
|
| -> IO (m a) |
Arguments
| :: Alternative m | |
| => Ghc (m a) |
|
| -> IO (m a) |
Ghc utilities
Arguments
| :: Options | |
| -> Cradle | |
| -> ModuleString | A module name. (e.g. "Data.List") |
| -> Ghc [String] |
Checking syntax of a target file using GHC. Warnings and errors are returned.
Arguments
| :: Options | |
| -> Cradle | |
| -> FilePath | A target file. |
| -> ModuleString | A module name. |
| -> Expression | A Haskell expression. |
| -> Ghc String |
Obtaining information of a target expression. (GHCi's info:)