Safe Haskell | None |
---|
The ghc-mod library.
- data Cradle = Cradle {}
- findCradle :: Maybe FilePath -> GHCVersion -> IO Cradle
- type GHCVersion = String
- getGHCVersion :: IO (GHCVersion, Int)
- data Options = Options {
- outputStyle :: OutputStyle
- hlintOpts :: [String]
- ghcOpts :: [String]
- operators :: Bool
- detailed :: Bool
- expandSplice :: Bool
- sandbox :: Maybe FilePath
- data OutputStyle
- = LispStyle
- | PlainStyle
- defaultOptions :: Options
- type ModuleString = String
- type Expression = String
- browseModule :: Options -> 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 -> IO String
- listLanguages :: Options -> IO String
- listFlags :: Options -> IO String
- debugInfo :: Options -> Cradle -> GHCVersion -> FilePath -> IO String
- withGHC :: Alternative m => FilePath -> Ghc (m a) -> IO (m a)
- withGHCDummyFile :: Alternative m => Ghc (m a) -> IO (m a)
- browse :: Options -> 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 -> Ghc [String]
- debug :: Options -> Cradle -> GHCVersion -> FilePath -> Ghc [String]
Cradle
The environment where this library is used
Cradle | |
|
Finding Cradle
.
An error would be thrown.
GHC version
type GHCVersion = StringSource
GHC version in String
getGHCVersion :: IO (GHCVersion, Int)Source
Getting GHC version. 7.6.3 becames 706 in the second of the result.
Options
defaultOptions :: OptionsSource
A default Options
.
Types
type ModuleString = StringSource
Module name
type Expression = StringSource
Haskell expression
IO
utilities
:: Options | |
-> 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.
:: 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:)
:: 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:)
listModules :: Options -> IO StringSource
Listing installed modules.
listLanguages :: Options -> IO StringSource
Listing language extensions.
Obtaining debug information.
Converting the Ghc
monad to the IO
monad
:: Alternative m | |
=> FilePath | A target file displayed in an error message |
-> Ghc (m a) |
|
-> IO (m a) |
:: Alternative m | |
=> Ghc (m a) |
|
-> IO (m a) |
Ghc
utilities
:: Options | |
-> ModuleString | A module name. (e.g. "Data.List") |
-> Ghc [String] |
Checking syntax of a target file using GHC. Warnings and errors are returned.
:: 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:)