Safe Haskell | None |
---|---|
Language | Haskell2010 |
IdeSession.Types.Public
Description
The public types
- data IdNameSpace
- type Type = Text
- type Name = Text
- data IdInfo = IdInfo {}
- data IdProp = IdProp {
- idName :: !Name
- idSpace :: !IdNameSpace
- idType :: !(Maybe Type)
- idDefinedIn :: !ModuleId
- idDefSpan :: !EitherSpan
- idHomeModule :: !(Maybe ModuleId)
- data IdScope
- = Binder
- | Local
- | Imported {
- idImportedFrom :: !ModuleId
- idImportSpan :: !EitherSpan
- idImportQual :: !Text
- | WiredIn
- data SourceSpan = SourceSpan {
- spanFilePath :: !FilePath
- spanFromLine :: !Int
- spanFromColumn :: !Int
- spanToLine :: !Int
- spanToColumn :: !Int
- data EitherSpan
- = ProperSpan !SourceSpan
- | TextSpan !Text
- data SourceError = SourceError {
- errorKind :: !SourceErrorKind
- errorSpan :: !EitherSpan
- errorMsg :: !Text
- data SourceErrorKind
- type ModuleName = Text
- data ModuleId = ModuleId {}
- data PackageId = PackageId {
- packageName :: !Text
- packageVersion :: !(Maybe Text)
- packageKey :: !Text
- data ImportEntities
- = ImportOnly ![Text]
- | ImportHiding ![Text]
- | ImportAll
- data Import = Import {
- importModule :: !ModuleId
- importPackage :: !(Maybe Text)
- importQualified :: !Bool
- importImplicit :: !Bool
- importAs :: !(Maybe ModuleName)
- importEntities :: !ImportEntities
- data SpanInfo
- data RunBufferMode
- = RunNoBuffering
- | RunLineBuffering { }
- | RunBlockBuffering { }
- data RunResult
- data BreakInfo = BreakInfo {}
- type Value = Text
- type VariableEnv = [(Name, Type, Value)]
- data Targets
- data UpdateStatus
- idInfoQN :: IdInfo -> String
- haddockLink :: IdProp -> IdScope -> String
Types
data IdNameSpace Source
Identifiers in Haskell are drawn from a number of different name spaces
Information about identifiers
Identifier info that is independent of the usage site
Constructors
IdProp | |
Fields
|
Constructors
Binder | This is a binding occurrence ( |
Local | Defined within this module |
Imported | Imported from a different module |
Fields
| |
WiredIn | Wired into the compiler ( |
data SourceSpan Source
Constructors
SourceSpan | |
Fields
|
data EitherSpan Source
Constructors
ProperSpan !SourceSpan | |
TextSpan !Text |
data SourceError Source
An error or warning in a source module.
Most errors are associated with a span of text, but some have only a location point.
Constructors
SourceError | |
Fields
|
type ModuleName = Text Source
Constructors
ModuleId | |
Fields
|
A package ID in ide-backend consists of a human-readable package name and version (what Cabal calls a source ID) along with ghc's internal package key (primarily for internal use).
Constructors
PackageId | |
Fields
|
data ImportEntities Source
Constructors
ImportOnly ![Text] | |
ImportHiding ![Text] | |
ImportAll |
Constructors
Import | |
Fields
|
Returned when the IDE asks "what's at this particular location?"
data RunBufferMode Source
Buffer modes for running code
Note that NoBuffering
means that something like putStrLn
will do a
syscall per character, and each of these characters will be read and sent
back to the client. This results in a large overhead.
When using LineBuffering
or BlockBuffering
, runWait
will not report
any output from the snippet until it outputs a linebreak/fills the buffer,
respectively (or does an explicit flush). However, you can specify a timeout
in addition to the buffering mode; if you set this to Just n
, the buffer
will be flushed every n
microseconds.
NOTE: This is duplicated in the IdeBackendRTS (defined in IdeSession)
Constructors
RunNoBuffering | |
RunLineBuffering | |
Fields | |
RunBlockBuffering | |
Fields |
The outcome of running code
Constructors
RunOk | The code terminated okay |
RunProgException String | The code threw an exception |
RunGhcException String | GHC itself threw an exception when we tried to run the code |
RunForceCancelled | The session was restarted |
RunBreak | Execution was paused because of a breakpoint |
Information about a triggered breakpoint
Constructors
BreakInfo | |
Fields
|
type VariableEnv = [(Name, Type, Value)] Source
Variables during execution (in debugging mode)
Constructors
TargetsInclude [FilePath] | |
TargetsExclude [FilePath] |
data UpdateStatus Source
This type represents the status of the compilation from an IDE update.
Util
haddockLink :: IdProp -> IdScope -> String Source
Show approximately a haddock link (without haddock root) for an id. This is an illustration and a test of the id info, but under ideal conditions could perhaps serve to link to documentation without going via Hoogle.