| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.Haskell.Tools.Refactor.Daemon
Contents
- runDaemonCLI :: IO ()
- runDaemon :: [String] -> IO ()
- defaultArgs :: [String]
- clientLoop :: Bool -> Socket -> IO ()
- serverLoop :: Bool -> Session -> MVar DaemonSessionState -> Socket -> IO ()
- respondTo :: Session -> MVar DaemonSessionState -> (ByteString -> IO ()) -> ByteString -> IO Bool
- updateClient :: (ResponseMsg -> IO ()) -> ClientMessage -> StateT DaemonSessionState Ghc Bool
- addPackages :: (ResponseMsg -> IO ()) -> [FilePath] -> StateT DaemonSessionState Ghc ()
- data UndoRefactor
- = RemoveAdded { }
- | RestoreRemoved { }
- | UndoChanges { }
- type FileDiff = [(Int, Int, String)]
- createUndo :: Eq a => Int -> [Diff [a]] -> [(Int, Int, [a])]
- initGhcSession :: IO Session
- usePackageDB :: GhcMonad m => [FilePath] -> m ()
- getProblems :: RefactorException -> Either String [(SrcSpan, String)]
- data ClientMessage
- = KeepAlive
- | Handshake {
- clientVersion :: [Int]
- | SetPackageDB { }
- | AddPackages {
- addedPathes :: [FilePath]
- | RemovePackages {
- removedPathes :: [FilePath]
- | PerformRefactoring {
- refactoring :: String
- modulePath :: FilePath
- editorSelection :: String
- details :: [String]
- | Stop
- | Disconnect
- | ReLoad {
- addedModules :: [FilePath]
- changedModules :: [FilePath]
- removedModules :: [FilePath]
- data ResponseMsg
- = KeepAliveResponse
- | HandshakeResponse {
- serverVersion :: [Int]
- | ErrorMessage { }
- | CompilationProblem {
- errorMarkers :: [(SrcSpan, String)]
- | ModulesChanged {
- undoChanges :: [UndoRefactor]
- | LoadedModules {
- loadedModules :: [(FilePath, String)]
- | LoadingModules {
- modulesToLoad :: [FilePath]
- | Disconnected
Documentation
runDaemonCLI :: IO () Source #
defaultArgs :: [String] Source #
serverLoop :: Bool -> Session -> MVar DaemonSessionState -> Socket -> IO () Source #
respondTo :: Session -> MVar DaemonSessionState -> (ByteString -> IO ()) -> ByteString -> IO Bool Source #
updateClient :: (ResponseMsg -> IO ()) -> ClientMessage -> StateT DaemonSessionState Ghc Bool Source #
This function does the real job of acting upon client messages in a stateful environment of a client
addPackages :: (ResponseMsg -> IO ()) -> [FilePath] -> StateT DaemonSessionState Ghc () Source #
data UndoRefactor Source #
Constructors
| RemoveAdded | |
Fields | |
| RestoreRemoved | |
Fields | |
| UndoChanges | |
Fields | |
Instances
usePackageDB :: GhcMonad m => [FilePath] -> m () Source #
getProblems :: RefactorException -> Either String [(SrcSpan, String)] Source #
data ClientMessage Source #
Constructors
| KeepAlive | |
| Handshake | |
Fields
| |
| SetPackageDB | |
| AddPackages | |
Fields
| |
| RemovePackages | |
Fields
| |
| PerformRefactoring | |
Fields
| |
| Stop | |
| Disconnect | |
| ReLoad | |
Fields
| |
Instances
data ResponseMsg Source #
Constructors
| KeepAliveResponse | |
| HandshakeResponse | |
Fields
| |
| ErrorMessage | |
| CompilationProblem | |
Fields
| |
| ModulesChanged | |
Fields
| |
| LoadedModules | |
Fields
| |
| LoadingModules | |
Fields
| |
| Disconnected | |
Instances