on master help sign in
Remove use of `managed` for starting the scenario service (#1508)
b6fd3c1Moritz Kiefer
src/Development/IDE/State/Service.hs+2−3
@@ -24,7 +24,6 @@ import Control.Monad.Except
24import Development.IDE.Types.Options (IdeOptions(..))
24import Development.IDE.Types.Options (IdeOptions(..))
25import Development.IDE.State.FileStore
25import Development.IDE.State.FileStore
26import qualified Development.IDE.Logger as Logger
26import qualified Development.IDE.Logger as Logger
27−import Data.Maybe
28import Data.Set (Set)
27import Data.Set (Set)
29import qualified Data.Set as Set
28import qualified Data.Set as Set
30import Development.IDE.Functions.GHCError
29import Development.IDE.Functions.GHCError
@@ -70,14 +69,14 @@ unsafeClearDiagnostics = unsafeClearAllDiagnostics
70
69
71-- | Initialise the Compiler Service.
70-- | Initialise the Compiler Service.
72initialise :: Rules ()
71initialise :: Rules ()
73− -> Maybe (Event -> IO ())
72+ -> (Event -> IO ())
74 -> Logger.Handle
73 -> Logger.Handle
75 -> IdeOptions
74 -> IdeOptions
76 -> VFSHandle
75 -> VFSHandle
77 -> IO IdeState
76 -> IO IdeState
78initialise mainRule toDiags logger options vfs =
77initialise mainRule toDiags logger options vfs =
79 shakeOpen
78 shakeOpen
80− (fromMaybe (const $ pure ()) toDiags)
79+ toDiags
81 logger
80 logger
82 (setProfiling options $
81 (setProfiling options $
83 shakeOptions { shakeThreads = optThreads options
82 shakeOptions { shakeThreads = optThreads options
src/Development/IDE/Types/LSP.hs−3
@@ -52,7 +52,4 @@ data Event
52 | EventFileValidation Int Int
52 | EventFileValidation Int Int
53 -- ^ @EventFileValidation finishedValidations totalValidations @
53 -- ^ @EventFileValidation finishedValidations totalValidations @
54 -- How many validations have we finished of how many total.
54 -- How many validations have we finished of how many total.
55− | EventFatalError !T.Text
56− -- ^ @EventFatalError reason@: A fatal error occurred in the compiler and
57− -- the compiler cannot continue.
58 deriving Show
55 deriving Show
test/Demo.hs+1−1
@@ -42,7 +42,7 @@ main = do
42 vfs <- makeVFSHandle
42 vfs <- makeVFSHandle
43 ide <- initialise
43 ide <- initialise
44 mainRule
44 mainRule
45− (Just $ showEvent lock)
45+ (showEvent lock)
46 (makeOneHandle $ withLock lock . T.putStrLn)
46 (makeOneHandle $ withLock lock . T.putStrLn)
47 IdeOptions
47 IdeOptions
48 {optPreprocessor = (,) []
48 {optPreprocessor = (,) []