haskell-tools-daemon-1.1.1.0: Background process for Haskell-tools that editors can connect to.

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Daemon

Description

The central module for the background process of Haskell-tools. Starts the daemon process and updates it for each client request in a loop. After this releases the resources and terminates.

Synopsis

Documentation

runDaemon' :: [RefactoringChoice] -> [QueryChoice] -> DaemonOptions -> IO () Source #

Starts the daemon process. This will not return until the daemon stops. You can use this entry point when the other endpoint of the client connection is not needed, for example, when you use socket connection to connect to the daemon process.

runDaemon :: [RefactoringChoice] -> [QueryChoice] -> WorkingMode a -> MVar a -> DaemonOptions -> IO () Source #

Starts the daemon process. This will not return until the daemon stops. The daemon process is parameterized by the refactorings you can use in it. This entry point gives back the other endpoint of the connection so it can be used to run the daemon in the same process.

serverLoop :: [RefactoringChoice] -> [QueryChoice] -> WorkingMode a -> a -> DaemonOptions -> Session -> MVar DaemonSessionState -> MVar [Marker] -> IO () Source #

Starts the server loop, receiving requests from the client and updated the server state according to these.

respondTo :: DaemonOptions -> [RefactoringChoice] -> [QueryChoice] -> Session -> MVar DaemonSessionState -> (ResponseMsg -> IO ()) -> MVar [Marker] -> ClientMessage -> IO Bool Source #

Responds to a client request by modifying the daemon and GHC state accordingly.