1
+ {-# OPTIONS_GHC -fno-warn-partial-type-signatures #-}
2
+
1
3
{-# LANGUAGE DataKinds #-}
2
4
{-# LANGUAGE OverloadedStrings #-}
3
5
{-# LANGUAGE GADTs #-}
@@ -8,13 +10,11 @@ import Control.Concurrent
8
10
import Control.Concurrent.STM.TChan
9
11
import Control.Monad.IO.Class
10
12
import Control.Monad.STM
11
- import qualified Data.Map as Map
12
13
import Data.Monoid
13
14
import qualified Data.Text as T
14
15
import Haskell.Ide.Engine.ExtensibleState
15
16
import Haskell.Ide.Engine.MonadFunctions
16
17
import Haskell.Ide.Engine.PluginDescriptor
17
- import Haskell.Ide.Engine.PluginUtils
18
18
19
19
-- ---------------------------------------------------------------------
20
20
@@ -64,7 +64,7 @@ instance ExtensionClass AsyncPluginState where
64
64
65
65
-- | This command manages interaction with a separate process, doing stuff.
66
66
longRunningCmdSync :: WorkerCmd -> CommandFunc T. Text
67
- longRunningCmdSync cmd = CmdSync $ \ _ctx req -> do
67
+ longRunningCmdSync cmd = CmdSync $ \ _ctx _req -> do
68
68
SubProcess cin cout _tid <- ensureProcessRunning
69
69
liftIO $ atomically $ writeTChan cin cmd
70
70
res <- liftIO $ atomically $ readTChan cout
@@ -95,6 +95,7 @@ ensureProcessRunning = do
95
95
workerProc :: TChan WorkerCmd -> TChan T. Text -> IO ()
96
96
workerProc cin cout = loop 1
97
97
where
98
+ loop :: Integer -> IO ()
98
99
loop cnt = do
99
100
debugm " workerProc:top of loop"
100
101
req <- liftIO $ atomically $ readTChan cin
@@ -111,7 +112,7 @@ workerProc cin cout = loop 1
111
112
112
113
-- | This command manages interaction with a separate process, doing stuff.
113
114
streamingCmdAsync :: WorkerCmdAsync -> CommandFunc T. Text
114
- streamingCmdAsync cmd = CmdAsync $ \ replyFunc _ctx req -> do
115
+ streamingCmdAsync cmd = CmdAsync $ \ replyFunc _ctx _req -> do
115
116
tid <- liftIO $ forkIO (workerProcAsync cmd replyFunc)
116
117
debugm $ " streamingCmdAsync:launched worker as " ++ show tid
117
118
let tidStr = T. pack (show tid ++ " :" )
0 commit comments