hhp-0.0.3: Happy Haskell Programming

Safe HaskellNone
LanguageHaskell2010

Hhp.Ghc

Contents

Description

The Happy Haskell Programming library. API for interactive processes

Synopsis

Converting the Ghc monad to the IO monad

withGHC Source #

Arguments

:: FilePath

A target file displayed in an error message.

-> Ghc a

Ghc actions created by the Ghc utilities.

-> IO a 

Converting the Ghc monad to the IO monad.

withGHC' :: Ghc a -> IO a Source #

Initializing DynFlags

initializeFlagsWithCradle :: Options -> Cradle -> Ghc () Source #

Initialize the DynFlags relating to the compilation of a single file or GHC session according to the Cradle and Options provided.

Ghc utilities

boot :: Options -> Ghc String Source #

Printing necessary information for front-end booting.

browse Source #

Arguments

:: Options 
-> ModuleString

A module name. (e.g. "Data.List")

-> Ghc String 

Getting functions, classes, etc from a module. If detailed is True, their types are also obtained. If operators is True, operators are also returned.

check Source #

Arguments

:: Options 
-> [FilePath]

The target files.

-> Ghc (Either String String) 

Checking syntax of a target file using GHC. Warnings and errors are returned.

info Source #

Arguments

:: Options 
-> FilePath

A target file.

-> Expression

A Haskell expression.

-> Ghc String 

Obtaining information of a target expression. (GHCi's info:)

types Source #

Arguments

:: Options 
-> FilePath

A target file.

-> Int

Line number.

-> Int

Column number.

-> Ghc String 

Obtaining type of a target expression. (GHCi's type:)

modules :: Options -> Ghc String Source #

Listing installed modules.

SymMdlDb

type Symbol = String Source #

Type of key for SymMdlDb.

data SymMdlDb Source #

Database from Symbol to modules.

lookupSym :: Options -> Symbol -> SymMdlDb -> String Source #

Looking up SymMdlDb with Symbol to find modules.

Misc

getSystemLibDir :: IO (Maybe FilePath) Source #

Obtaining the directory for system libraries.