ghc-mod-5.5.0.0: Happy Haskell Programming

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.GhcMod.Types

Synopsis

Documentation

type IOish m = (Functor m, MonadIO m, MonadBaseControl IO m, ExceptionMonad m)

A constraint alias (-XConstraintKinds) to make functions dealing with GhcModT somewhat cleaner.

Basicially an IOish m => m is a Monad supporting arbitrary IO and exception handling. Usually this will simply be IO but we parametrise it in the exported API so users have the option to use a custom inner monad.

type MonadIOC m = MonadIO m

class MonadIOC m => MonadIO m where

Methods

liftIO :: IO a -> m a

data OutputStyle

Output style.

Constructors

LispStyle

S expression style.

PlainStyle

Plain textstyle.

Instances

newtype LineSeparator

The type for line separator. Historically, a Null string is used.

Constructors

LineSeparator String 

Instances

data FileMapping

Constructors

FileMapping 

Fields

fmPath :: FilePath
 
fmTemp :: Bool
 

Instances

data Programs

Constructors

Programs 

Fields

ghcProgram :: FilePath

ghc program name.

ghcPkgProgram :: FilePath

ghc-pkg program name.

cabalProgram :: FilePath

cabal program name.

stackProgram :: FilePath

stack program name.

Instances

data OutputOpts

Constructors

OutputOpts 

Fields

ooptLogLevel :: GmLogLevel

Verbosity

ooptStyle :: OutputStyle
 
ooptLineSeparator :: LineSeparator

Line separator string.

ooptLinePrefix :: Maybe (String, String)

Stdout/err line multiplexing using prefix encoding. fst is stdout, snd is stderr prefix.

Instances

data Options

Constructors

Options 

Fields

optOutput :: OutputOpts
 
optPrograms :: Programs
 
optGhcUserOptions :: [GHCOption]

GHC command line options set on the ghc-mod command line

optFileMappings :: [(FilePath, Maybe FilePath)]
 

Instances

data Cradle

The environment where this library is used.

Constructors

Cradle 

Fields

cradleProject :: Project
 
cradleCurrentDir :: FilePath

The directory where this library is executed.

cradleRootDir :: FilePath

The project root directory.

cradleTempDir :: FilePath

Per-Project temporary directory

cradleCabalFile :: Maybe FilePath

The file name of the found cabal file.

cradleDistDir :: FilePath

The build info directory.

Instances

data GmStream

Constructors

GmOutStream 
GmErrStream 

Instances

data GhcModEnv

Constructors

GhcModEnv 

data GhcModOut

Constructors

GhcModOut 

data GmGhcSession

Constructors

GmGhcSession 

data GhcPkgDb

GHC package database flags.

type GHCOption = String

A single GHC command line option.

type IncludeDir = FilePath

An include directory for modules.

newtype Expression

Haskell expression.

Constructors

Expression 

data GhcModError

Constructors

GMENoMsg

Unknown error

GMEString String

Some Error with a message. These are produced mostly by fail calls on GhcModT.

GMECabalConfigure GhcModError

Configuring a cabal project failed.

GMEStackConfigure GhcModError

Configuring a stack project failed.

GMEStackBootstrap GhcModError

Bootstrapping stack environment failed (process exited with failure)

GMECabalCompAssignment [(Either FilePath ModuleName, Set ChComponentName)]

Could not find a consistent component assignment for modules

GMEProcess String String [String] (Either Int GhcModError)

Launching an operating system process failed. Fields in order: function, command, arguments, (stdout, stderr, exitcode)

GMENoCabalFile

No cabal file found.

GMETooManyCabalFiles [FilePath]

Too many cabal files found.

data LintOpts

Options for "lintWith" function

Constructors

LintOpts 

Fields

optLintHlintOpts :: [String]

options that will be passed to hlint executable

Instances

defaultLintOpts :: LintOpts

Default LintOpts instance

data BrowseOpts

Options for "browseWith" function

Constructors

BrowseOpts 

Fields

optBrowseOperators :: Bool

If True, "browseWith" also returns operators.

optBrowseDetailed :: Bool

If True, "browseWith" also returns types.

optBrowseQualified :: Bool

If True, "browseWith" will return fully qualified name

Instances

lOptPrograms :: forall cat. ArrowApply cat => Lens cat Options Programs

lOptOutput :: forall cat. ArrowApply cat => Lens cat Options OutputOpts

lOptGhcUserOptions :: forall cat. ArrowApply cat => Lens cat Options [GHCOption]

lOoptStyle :: forall cat. ArrowApply cat => Lens cat OutputOpts OutputStyle

lStackProgram :: forall cat. ArrowApply cat => Lens cat Programs FilePath

lGhcProgram :: forall cat. ArrowApply cat => Lens cat Programs FilePath

lGhcPkgProgram :: forall cat. ArrowApply cat => Lens cat Programs FilePath

lCabalProgram :: forall cat. ArrowApply cat => Lens cat Programs FilePath

data ModuleName :: *

A ModuleName is essentially a simple string, e.g. Data.List.