leksah-0.10.0.4: Haskell IDE written in HaskellSource codeContentsIndex
IDE.Core.Types
Description
The core state of ide. This module is imported from every other module, | and all data structures of the state are declared here, to avoid circular | module dependencies.
Synopsis
data IDE = IDE {
frameState :: FrameState IDEM
recentPanes :: [PaneName]
specialKeys :: SpecialKeyTable IDERef
specialKey :: SpecialKeyCons IDERef
candy :: CandyTable
prefs :: Prefs
workspace :: Maybe Workspace
activePack :: Maybe IDEPackage
bufferProjCache :: Map FilePath (Maybe IDEPackage)
allLogRefs :: [LogRef]
currentEBC :: (Maybe LogRef, Maybe LogRef, Maybe LogRef)
currentHist :: Int
systemInfo :: Maybe GenScope
packageInfo :: Maybe (GenScope, GenScope)
workspaceInfo :: Maybe (GenScope, GenScope)
workspInfoCache :: PackageDescrCache
handlers :: Map String [(Unique, IDEEvent -> IDEM IDEEvent)]
currentState :: IDEState
guiHistory :: (Bool, [GUIHistory], Int)
findbar :: (Bool, Maybe (Toolbar, ListStore String))
toolbar :: (Bool, Maybe Toolbar)
recentFiles :: [FilePath]
recentWorkspaces :: [FilePath]
runningTool :: Maybe ProcessHandle
debugState :: Maybe (IDEPackage, ToolState)
completion :: ((Int, Int), Maybe CompletionWindow)
yiControl :: Control
server :: Maybe Handle
}
data IDEState
= IsStartingUp
| IsShuttingDown
| IsRunning
| IsFlipping TreeView
| IsCompleting Connections
type IDERef = IORef IDE
type IDEM = ReaderT IDERef IO
type IDEAction = IDEM ()
data IDEEvent
= InfoChanged Bool
| UpdateWorkspaceInfo
| SelectInfo String
| SelectIdent Descr
| LogMessage String LogTag
| RecordHistory GUIHistory
| Sensitivity [(SensitivityMask, Bool)]
| SearchMeta String
| LoadSession FilePath
| SaveSession FilePath
| UpdateRecent
| VariablesChanged
| ErrorChanged
| CurrentErrorChanged (Maybe LogRef)
| BreakpointChanged
| CurrentBreakChanged (Maybe LogRef)
| TraceChanged
| GetTextPopup (Maybe (IDERef -> Menu -> IO ()))
| StatusbarChanged [StatusbarCompartment]
| WorkspaceChanged Bool Bool
liftIDE :: IDEM a -> WorkspaceM a
type WorkspaceM = ReaderT Workspace IDEM
type WorkspaceAction = WorkspaceM ()
runWorkspace :: WorkspaceM a -> Workspace -> IDEM a
type PackageM = ReaderT IDEPackage IDEM
type PackageAction = PackageM ()
runPackage :: PackageM a -> IDEPackage -> IDEM a
type DebugM = ReaderT (IDEPackage, ToolState) IDEM
type DebugAction = DebugM ()
runDebug :: DebugM a -> (IDEPackage, ToolState) -> IDEM a
data IDEPackage = IDEPackage {
ipdPackageId :: PackageIdentifier
ipdCabalFile :: FilePath
ipdDepends :: [Dependency]
ipdModules :: Set ModuleName
ipdMain :: [FilePath]
ipdExtraSrcs :: Set FilePath
ipdSrcDirs :: [FilePath]
ipdExtensions :: [Extension]
ipdConfigFlags :: [String]
ipdBuildFlags :: [String]
ipdHaddockFlags :: [String]
ipdExeFlags :: [String]
ipdInstallFlags :: [String]
ipdRegisterFlags :: [String]
ipdUnregisterFlags :: [String]
ipdSdistFlags :: [String]
}
data Workspace = Workspace {
wsVersion :: Int
wsSaveTime :: String
wsName :: String
wsFile :: FilePath
wsPackages :: [IDEPackage]
wsPackagesFiles :: [FilePath]
wsActivePackFile :: Maybe FilePath
wsNobuildPack :: [IDEPackage]
}
data ActionDescr alpha = AD {
name :: ActionString
label :: String
tooltip :: Maybe String
stockID :: Maybe String
action :: ReaderT alpha IO ()
accelerator :: [KeyString]
isToggle :: Bool
}
type ActionString = String
type KeyString = String
data Prefs = Prefs {
prefsFormat :: Int
prefsSaveTime :: String
showLineNumbers :: Bool
rightMargin :: (Bool, Int)
tabWidth :: Int
wrapLines :: Bool
sourceCandy :: (Bool, String)
keymapName :: String
forceLineEnds :: Bool
removeTBlanks :: Bool
textviewFont :: Maybe String
sourceStyle :: (Bool, String)
foundBackground :: Color
contextBackground :: Color
breakpointBackground :: Color
autoLoad :: Bool
useYi :: Bool
logviewFont :: Maybe String
defaultSize :: (Int, Int)
browser :: String
pathForCategory :: [(String, PanePath)]
defaultPath :: PanePath
categoryForPane :: [(String, String)]
packageBlacklist :: [Dependency]
collectAtStart :: Bool
useCtrlTabFlipping :: Bool
docuSearchURL :: String
completeRestricted :: Bool
saveAllBeforeBuild :: Bool
backgroundBuild :: Bool
makeMode :: Bool
singleBuildWithoutLinking :: Bool
dontInstallLast :: Bool
printEvldWithShow :: Bool
breakOnException :: Bool
breakOnError :: Bool
printBindResult :: Bool
serverIP :: String
serverPort :: Int
sourceDirectories :: [FilePath]
unpackDirectory :: Maybe FilePath
retrieveURL :: String
retrieveStrategy :: RetrieveStrategy
endWithLastConn :: Bool
}
data LogRefType
= WarningRef
| ErrorRef
| BreakpointRef
| ContextRef
data LogRef = LogRef {
logRefSrcSpan :: SrcSpan
logRefPackage :: IDEPackage
refDescription :: String
logLines :: (Int, Int)
logRefType :: LogRefType
}
logRefFilePath :: LogRef -> FilePath
logRefFullFilePath :: LogRef -> FilePath
isError :: LogRef -> Bool
isBreakpoint :: LogRef -> Bool
displaySrcSpan :: SrcSpan -> [Char]
colorHexString :: Color -> [Char]
data SearchHint
= Forward
| Backward
| Insert
| Delete
| Initial
newtype CandyTable = CT (CandyTableForth, CandyTableBack)
type CandyTableForth = [(Bool, String, String)]
type CandyTableBack = [(String, String, Int)]
newtype KeymapI = KM (Map ActionString [(Maybe (Either KeyString (KeyString, KeyString)), Maybe String)])
type SpecialKeyTable alpha = Map (KeyVal, [Modifier]) (Map (KeyVal, [Modifier]) (ActionDescr alpha))
type SpecialKeyCons alpha = Maybe (Map (KeyVal, [Modifier]) (ActionDescr alpha), String)
type PackageDescrCache = Map PackageIdentifier ModuleDescrCache
type ModuleDescrCache = Map ModuleName (ClockTime, Maybe FilePath, ModuleDescr)
data CompletionWindow = CompletionWindow {
cwWindow :: Window
cwTreeView :: TreeView
cwListStore :: ListStore String
}
data LogTag
= LogTag
| ErrorTag
| FrameTag
| InputTag
| InfoTag
type GUIHistory = (GUIHistory', GUIHistory')
data GUIHistory'
= ModuleSelected {
moduleS :: Maybe ModuleName
facetS :: Maybe String
}
| ScopeSelected {
scope :: Scope
blacklist :: Bool
}
| InfoElementSelected {
mbInfo :: Maybe Descr
}
| PaneSelected {
paneN :: Maybe String
}
data SensitivityMask
= SensitivityForwardHist
| SensitivityBackwardHist
| SensitivityProjectActive
| SensitivityWorkspaceOpen
| SensitivityError
| SensitivityEditor
| SensitivityInterpreting
data SearchMode
= Exact {
caseSense :: Bool
}
| Prefix {
caseSense :: Bool
}
| Regex {
caseSense :: Bool
}
data StatusbarCompartment
= CompartmentCommand String
| CompartmentPane (Maybe (IDEPane IDEM))
| CompartmentPackage String
| CompartmentState String
| CompartmentOverlay Bool
| CompartmentBufferPos (Int, Int)
| CompartmentBuild Bool
| CompartmentCollect Bool
Documentation
data IDE Source
The IDE state
Constructors
IDE
frameState :: FrameState IDEMstate of the windows framework
recentPanes :: [PaneName]a list of panes which were selected last
specialKeys :: SpecialKeyTable IDERefa structure for emacs like keystrokes
specialKey :: SpecialKeyCons IDERefthe first of a double keystroke
candy :: CandyTabletable for source candy
prefs :: Prefsconfiguration preferences
workspace :: Maybe Workspacemay be a workspace (set of packages)
activePack :: Maybe IDEPackage
bufferProjCache :: Map FilePath (Maybe IDEPackage)
allLogRefs :: [LogRef]
currentEBC :: (Maybe LogRef, Maybe LogRef, Maybe LogRef)
currentHist :: Int
systemInfo :: Maybe GenScopethe system scope
packageInfo :: Maybe (GenScope, GenScope)the second are the imports
workspaceInfo :: Maybe (GenScope, GenScope)the second are the imports
workspInfoCache :: PackageDescrCache
handlers :: Map String [(Unique, IDEEvent -> IDEM IDEEvent)]event handling table
currentState :: IDEState
guiHistory :: (Bool, [GUIHistory], Int)
findbar :: (Bool, Maybe (Toolbar, ListStore String))
toolbar :: (Bool, Maybe Toolbar)
recentFiles :: [FilePath]
recentWorkspaces :: [FilePath]
runningTool :: Maybe ProcessHandle
debugState :: Maybe (IDEPackage, ToolState)
completion :: ((Int, Int), Maybe CompletionWindow)
yiControl :: Control
server :: Maybe Handle
data IDEState Source
Constructors
IsStartingUpLeksah is in startup mode
IsShuttingDownLeksah is about to go down
IsRunningLeksah is running
IsFlipping TreeViewThe flipper is used to switch between sources
IsCompleting ConnectionsThe completion feature is used
type IDERef = IORef IDESource
A mutable reference to the IDE state
type IDEM = ReaderT IDERef IOSource
The IDE Monad
type IDEAction = IDEM ()Source
A shorthand for a reader monad for a mutable reference to the IDE state which does not return a value
data IDEEvent Source
Constructors
InfoChanged Bool
UpdateWorkspaceInfo
SelectInfo String
SelectIdent Descr
LogMessage String LogTag
RecordHistory GUIHistory
Sensitivity [(SensitivityMask, Bool)]
SearchMeta String
LoadSession FilePath
SaveSession FilePath
UpdateRecent
VariablesChanged
ErrorChanged
CurrentErrorChanged (Maybe LogRef)
BreakpointChanged
CurrentBreakChanged (Maybe LogRef)
TraceChanged
GetTextPopup (Maybe (IDERef -> Menu -> IO ()))
StatusbarChanged [StatusbarCompartment]
WorkspaceChanged Bool BoolshowPane updateFileCache
show/hide Instances
liftIDE :: IDEM a -> WorkspaceM aSource
type WorkspaceM = ReaderT Workspace IDEMSource
type WorkspaceAction = WorkspaceM ()Source
runWorkspace :: WorkspaceM a -> Workspace -> IDEM aSource
type PackageM = ReaderT IDEPackage IDEMSource
type PackageAction = PackageM ()Source
runPackage :: PackageM a -> IDEPackage -> IDEM aSource
type DebugM = ReaderT (IDEPackage, ToolState) IDEMSource
type DebugAction = DebugM ()Source
runDebug :: DebugM a -> (IDEPackage, ToolState) -> IDEM aSource
data IDEPackage Source
Constructors
IDEPackage
ipdPackageId :: PackageIdentifier
ipdCabalFile :: FilePath
ipdDepends :: [Dependency]
ipdModules :: Set ModuleName
ipdMain :: [FilePath]
ipdExtraSrcs :: Set FilePath
ipdSrcDirs :: [FilePath]
ipdExtensions :: [Extension]
ipdConfigFlags :: [String]
ipdBuildFlags :: [String]
ipdHaddockFlags :: [String]
ipdExeFlags :: [String]
ipdInstallFlags :: [String]
ipdRegisterFlags :: [String]
ipdUnregisterFlags :: [String]
ipdSdistFlags :: [String]
show/hide Instances
data Workspace Source
Constructors
Workspace
wsVersion :: Int
wsSaveTime :: String
wsName :: String
wsFile :: FilePath
wsPackages :: [IDEPackage]
wsPackagesFiles :: [FilePath]
wsActivePackFile :: Maybe FilePath
wsNobuildPack :: [IDEPackage]
show/hide Instances
data ActionDescr alpha Source
ActionDescr is a data structure from which GtkActions are build, which are used for menus, toolbars, and accelerator keystrokes
Constructors
AD
name :: ActionString
label :: String
tooltip :: Maybe String
stockID :: Maybe String
action :: ReaderT alpha IO ()
accelerator :: [KeyString]
isToggle :: Bool
type ActionString = StringSource
type KeyString = StringSource
data Prefs Source
Preferences is a data structure to hold configuration data
Constructors
Prefs
prefsFormat :: Int
prefsSaveTime :: String
showLineNumbers :: Bool
rightMargin :: (Bool, Int)
tabWidth :: Int
wrapLines :: Bool
sourceCandy :: (Bool, String)
keymapName :: String
forceLineEnds :: Bool
removeTBlanks :: Bool
textviewFont :: Maybe String
sourceStyle :: (Bool, String)
foundBackground :: Color
contextBackground :: Color
breakpointBackground :: Color
autoLoad :: Bool
useYi :: Bool
logviewFont :: Maybe String
defaultSize :: (Int, Int)
browser :: String
pathForCategory :: [(String, PanePath)]
defaultPath :: PanePath
categoryForPane :: [(String, String)]
packageBlacklist :: [Dependency]
collectAtStart :: Bool
useCtrlTabFlipping :: Bool
docuSearchURL :: String
completeRestricted :: Bool
saveAllBeforeBuild :: Bool
backgroundBuild :: Bool
makeMode :: Bool
singleBuildWithoutLinking :: Bool
dontInstallLast :: Bool
printEvldWithShow :: Bool
breakOnException :: Bool
breakOnError :: Bool
printBindResult :: Bool
serverIP :: String
serverPort :: Int
sourceDirectories :: [FilePath]
unpackDirectory :: Maybe FilePath
retrieveURL :: String
retrieveStrategy :: RetrieveStrategy
endWithLastConn :: Bool
show/hide Instances
data LogRefType Source
Other types
Constructors
WarningRef
ErrorRef
BreakpointRef
ContextRef
show/hide Instances
data LogRef Source
Constructors
LogRef
logRefSrcSpan :: SrcSpan
logRefPackage :: IDEPackage
refDescription :: String
logLines :: (Int, Int)
logRefType :: LogRefType
show/hide Instances
logRefFilePath :: LogRef -> FilePathSource
logRefFullFilePathSource
:: LogRefThe log ref
-> FilePaththe result
isError :: LogRef -> BoolSource
isBreakpoint :: LogRef -> BoolSource
displaySrcSpan :: SrcSpan -> [Char]Source
colorHexString :: Color -> [Char]Source
data SearchHint Source
Constructors
Forward
Backward
Insert
Delete
Initial
show/hide Instances
newtype CandyTable Source
Constructors
CT (CandyTableForth, CandyTableBack)
type CandyTableForth = [(Bool, String, String)]Source
type CandyTableBack = [(String, String, Int)]Source
newtype KeymapI Source
Constructors
KM (Map ActionString [(Maybe (Either KeyString (KeyString, KeyString)), Maybe String)])
show/hide Instances
type SpecialKeyTable alpha = Map (KeyVal, [Modifier]) (Map (KeyVal, [Modifier]) (ActionDescr alpha))Source
type SpecialKeyCons alpha = Maybe (Map (KeyVal, [Modifier]) (ActionDescr alpha), String)Source
type PackageDescrCache = Map PackageIdentifier ModuleDescrCacheSource
type ModuleDescrCache = Map ModuleName (ClockTime, Maybe FilePath, ModuleDescr)Source
data CompletionWindow Source
Constructors
CompletionWindow
cwWindow :: Window
cwTreeView :: TreeView
cwListStore :: ListStore String
data LogTag Source
Constructors
LogTag
ErrorTag
FrameTag
InputTag
InfoTag
type GUIHistory = (GUIHistory', GUIHistory')Source
the first one is the new and the second the old state
data GUIHistory' Source
Constructors
ModuleSelected
moduleS :: Maybe ModuleName
facetS :: Maybe String
ScopeSelected
scope :: Scope
blacklist :: Bool
InfoElementSelected
mbInfo :: Maybe Descr
PaneSelected
paneN :: Maybe String
show/hide Instances
data SensitivityMask Source
Constructors
SensitivityForwardHist
SensitivityBackwardHist
SensitivityProjectActive
SensitivityWorkspaceOpen
SensitivityError
SensitivityEditor
SensitivityInterpreting
show/hide Instances
data SearchMode Source
Constructors
Exact
caseSense :: Bool
Prefix
caseSense :: Bool
Regex
caseSense :: Bool
show/hide Instances
data StatusbarCompartment Source
Constructors
CompartmentCommand String
CompartmentPane (Maybe (IDEPane IDEM))
CompartmentPackage String
CompartmentState String
CompartmentOverlay Bool
CompartmentBufferPos (Int, Int)
CompartmentBuild Bool
CompartmentCollect Bool
Produced by Haddock version 2.6.1