Safe Haskell | None |
---|---|
Language | Haskell2010 |
Internal state of the session
This uses the internal types only.
- data Computed = Computed {
- computedErrors :: !(Strict [] SourceError)
- computedLoadedModules :: !(Strict [] ModuleName)
- computedFileMap :: !(Strict (Map FilePath) ModuleId)
- computedImports :: !(Strict (Map ModuleName) (Strict [] Import))
- computedAutoMap :: !(Strict (Map ModuleName) (Strict Trie (Strict [] IdInfo)))
- computedSpanInfo :: !(Strict (Map ModuleName) IdMap)
- computedExpTypes :: !(Strict (Map ModuleName) ExpMap)
- computedUseSites :: !(Strict (Map ModuleName) UseSites)
- computedPkgDeps :: !(Strict (Map ModuleName) (Strict [] PackageId))
- computedCache :: !ExplicitSharingCache
- data IdeSession = IdeSession {}
- data IdeStaticInfo = IdeStaticInfo {}
- data IdeSessionState
- type LogicalTimestamp = EpochTime
- data IdeIdleState = IdeIdleState {
- _ideLogicalTimestamp :: !LogicalTimestamp
- _ideComputed :: !(Strict Maybe Computed)
- _ideGhcOpts :: ![String]
- _ideRelativeIncludes :: ![FilePath]
- _ideGenerateCode :: !Bool
- _ideManagedFiles :: !ManagedFilesInternal
- _ideObjectFiles :: !ObjectFiles
- _ideBuildExeStatus :: !(Maybe ExitCode)
- _ideBuildDocStatus :: !(Maybe ExitCode)
- _ideBuildLicensesStatus :: !(Maybe ExitCode)
- _ideEnv :: ![(String, Maybe String)]
- _ideArgs :: ![String]
- _ideGhcServer :: GhcServer
- _ideGhcVersion :: GhcVersion
- _ideStdoutBufferMode :: !RunBufferMode
- _ideStderrBufferMode :: !RunBufferMode
- _ideBreakInfo :: !(Strict Maybe BreakInfo)
- _ideTargets :: !Targets
- _ideRtsOpts :: [String]
- data ManagedFilesInternal = ManagedFilesInternal {
- _managedSource :: [ManagedFile]
- _managedData :: [ManagedFile]
- type ManagedFile = (FilePath, (MD5Digest, LogicalTimestamp))
- data GhcServer
- data RunActions a = RunActions {
- runWait :: IO (Either ByteString a)
- interrupt :: IO ()
- supplyStdin :: ByteString -> IO ()
- forceCancel :: IO ()
- data IdeCallbacks = IdeCallbacks {}
- ideLogicalTimestamp :: Accessor IdeIdleState LogicalTimestamp
- ideComputed :: Accessor IdeIdleState (Strict Maybe Computed)
- ideGhcOpts :: Accessor IdeIdleState [String]
- ideRelativeIncludes :: Accessor IdeIdleState [FilePath]
- ideGenerateCode :: Accessor IdeIdleState Bool
- ideManagedFiles :: Accessor IdeIdleState ManagedFilesInternal
- ideObjectFiles :: Accessor IdeIdleState ObjectFiles
- ideBuildExeStatus :: Accessor IdeIdleState (Maybe ExitCode)
- ideBuildDocStatus :: Accessor IdeIdleState (Maybe ExitCode)
- ideBuildLicensesStatus :: Accessor IdeIdleState (Maybe ExitCode)
- ideEnv :: Accessor IdeIdleState [(String, Maybe String)]
- ideArgs :: Accessor IdeIdleState [String]
- ideGhcServer :: Accessor IdeIdleState GhcServer
- ideGhcVersion :: Accessor IdeIdleState GhcVersion
- ideStdoutBufferMode :: Accessor IdeIdleState RunBufferMode
- ideStderrBufferMode :: Accessor IdeIdleState RunBufferMode
- ideBreakInfo :: Accessor IdeIdleState (Strict Maybe BreakInfo)
- ideTargets :: Accessor IdeIdleState Targets
- ideRtsOpts :: Accessor IdeIdleState [String]
- managedSource :: Accessor ManagedFilesInternal [ManagedFile]
- managedData :: Accessor ManagedFilesInternal [ManagedFile]
- ideSourceDir :: IdeStaticInfo -> FilePath
- ideDataDir :: IdeStaticInfo -> FilePath
- defaultIdeCallbacks :: IdeCallbacks
- ideLogFunc :: IdeSession -> LogFunc
Types
Computed | |
|
data IdeSession Source
This type is a handle to a session state. Values of this type point to the non-persistent parts of the session state in memory and to directories containing source and data file that form the persistent part of the session state. Whenever we perform updates or run queries, it's always in the context of a particular handle, representing the session we want to work within. Many sessions can be active at once, but in normal applications this shouldn't be needed.
data IdeStaticInfo Source
IdeStaticInfo | |
|
data IdeSessionState Source
type LogicalTimestamp = EpochTime Source
data IdeIdleState Source
IdeIdleState | |
|
data ManagedFilesInternal Source
The collection of source and data files submitted by the user.
type ManagedFile = (FilePath, (MD5Digest, LogicalTimestamp)) Source
data RunActions a Source
Handles to the running code snippet, through which one can interact with the snippet.
Requirement: concurrent uses of supplyStdin
should be possible,
e.g., two threads that share a RunActions
should be able to provide
input concurrently without problems. (Currently this is ensured
by supplyStdin
writing to a channel.)
RunActions | |
|
data IdeCallbacks Source
Session callbacks. Currently this just configures how logging is handled.
Accessors
ideObjectFiles :: Accessor IdeIdleState ObjectFiles Source
To allow for non-server environments
ideSourceDir :: IdeStaticInfo -> FilePath Source
Get the directory that holds source files.
ideDataDir :: IdeStaticInfo -> FilePath Source
Get the directory that holds data files.
Callbacks
defaultIdeCallbacks :: IdeCallbacks Source
Default session configuration.
Use this instead of creating your own IdeCallbacks to be robust against extensions of IdeCallbacks.
> defaultIdeCallbacks = IdeCallbacks > { ideCallbacksLogFunc = \_ _ _ _ -> return () > }
ideLogFunc :: IdeSession -> LogFunc Source
Get the LogFunc
for use with the functions in IdeSession.Util.Logger