-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A web-based demo for Haskell-tools Refactor.
--   
--   Allows websocket clients to connect and performs refactorings on
--   demand. The clients maintain a continous connection with the server,
--   sending changes in the source files. When a refactor request is
--   received, it performs the changes and sends the modified source files
--   to the client.
@package haskell-tools-demo
@version 0.8.0.0

module Language.Haskell.Tools.Demo
type ClientId = Int
data RefactorSessionState
RefactorSessionState :: Map (String, String, FilePath) (UnnamedModule IdDom) -> Maybe (String, String, FilePath) -> Bool -> RefactorSessionState
[_refSessMods] :: RefactorSessionState -> Map (String, String, FilePath) (UnnamedModule IdDom)
[_actualMod] :: RefactorSessionState -> Maybe (String, String, FilePath)
[_isDisconnecting] :: RefactorSessionState -> Bool
refSessMods :: Lens RefactorSessionState RefactorSessionState (Map (String, String, FilePath) (UnnamedModule IdDom)) (Map (String, String, FilePath) (UnnamedModule IdDom))
isDisconnecting :: Lens RefactorSessionState RefactorSessionState Bool Bool
actualMod :: Lens RefactorSessionState RefactorSessionState (Maybe (String, String, FilePath)) (Maybe (String, String, FilePath))
initSession :: RefactorSessionState
runFromCLI :: IO ()
runDemo :: [String] -> IO ()

-- | The application that is evoked for each incoming request
app :: MVar [Int] -> FilePath -> Application
respondTo :: FilePath -> Int -> Session -> MVar RefactorSessionState -> (ByteString -> IO ()) -> ByteString -> IO ()

-- | This function does the real job of acting upon client messages in a
--   stateful environment of a client
updateClient :: FilePath -> ClientMessage -> StateT RefactorSessionState Ghc (Maybe ResponseMsg)
reloadAllMods :: FilePath -> StateT RefactorSessionState Ghc ()
createFileForModule :: FilePath -> String -> String -> IO ()
removeDirectoryIfPresent :: FilePath -> IO ()
moduleNameAndContent :: ((String, String, FilePath), mod) -> (SourceFileKey, mod)
dataDirs :: FilePath -> FilePath
userDir :: FilePath -> ClientId -> FilePath
initGhcSession :: FilePath -> IO Session
handleErrors :: FilePath -> ClientMessage -> (ResponseMsg -> IO ()) -> IO () -> IO ()
logToFile :: FilePath -> String -> ClientMessage -> IO ()
data ClientMessage
KeepAlive :: ClientMessage
InitialProject :: [(String, String)] -> ClientMessage
[initialModules] :: ClientMessage -> [(String, String)]
PerformRefactoring :: String -> String -> String -> [String] -> ClientMessage
[refactoring] :: ClientMessage -> String
[moduleName] :: ClientMessage -> String
[editorSelection] :: ClientMessage -> String
[details] :: ClientMessage -> [String]
ModuleChanged :: String -> String -> ClientMessage
[moduleName] :: ClientMessage -> String
[newContent] :: ClientMessage -> String
ModuleDeleted :: String -> ClientMessage
[moduleName] :: ClientMessage -> String
Disconnect :: ClientMessage
data ResponseMsg
RefactorChanges :: [(String, Maybe String)] -> ResponseMsg
[moduleChanges] :: ResponseMsg -> [(String, Maybe String)]
ASTViewContent :: String -> ResponseMsg
[astContent] :: ResponseMsg -> String
ErrorMessage :: String -> ResponseMsg
[errorMsg] :: ResponseMsg -> String
CompilationProblem :: String -> ResponseMsg
[errorMsg] :: ResponseMsg -> String
Disconnected :: ResponseMsg
instance GHC.Generics.Generic Language.Haskell.Tools.Demo.ResponseMsg
instance GHC.Show.Show Language.Haskell.Tools.Demo.ResponseMsg
instance GHC.Generics.Generic Language.Haskell.Tools.Demo.ClientMessage
instance GHC.Show.Show Language.Haskell.Tools.Demo.ClientMessage
instance Data.Aeson.Types.FromJSON.FromJSON Language.Haskell.Tools.Demo.ClientMessage
instance Data.Aeson.Types.ToJSON.ToJSON Language.Haskell.Tools.Demo.ResponseMsg
