diff --git a/src/Development/IDE/State/Service.hs b/src/Development/IDE/State/Service.hs index 618a48b3..9cbc6ec0 100644 --- a/src/Development/IDE/State/Service.hs +++ b/src/Development/IDE/State/Service.hs @@ -24,7 +24,6 @@ import Control.Monad.Except import Development.IDE.Types.Options (IdeOptions(..)) import Development.IDE.State.FileStore import qualified Development.IDE.Logger as Logger -import Data.Maybe import Data.Set (Set) import qualified Data.Set as Set import Development.IDE.Functions.GHCError @@ -70,14 +69,14 @@ unsafeClearDiagnostics = unsafeClearAllDiagnostics -- | Initialise the Compiler Service. initialise :: Rules () - -> Maybe (Event -> IO ()) + -> (Event -> IO ()) -> Logger.Handle -> IdeOptions -> VFSHandle -> IO IdeState initialise mainRule toDiags logger options vfs = shakeOpen - (fromMaybe (const $ pure ()) toDiags) + toDiags logger (setProfiling options $ shakeOptions { shakeThreads = optThreads options diff --git a/src/Development/IDE/Types/LSP.hs b/src/Development/IDE/Types/LSP.hs index 9885a7ea..26e45cbd 100644 --- a/src/Development/IDE/Types/LSP.hs +++ b/src/Development/IDE/Types/LSP.hs @@ -52,7 +52,4 @@ data Event | EventFileValidation Int Int -- ^ @EventFileValidation finishedValidations totalValidations @ -- How many validations have we finished of how many total. - | EventFatalError !T.Text - -- ^ @EventFatalError reason@: A fatal error occurred in the compiler and - -- the compiler cannot continue. deriving Show diff --git a/test/Demo.hs b/test/Demo.hs index fba5aebd..d11c9c7d 100644 --- a/test/Demo.hs +++ b/test/Demo.hs @@ -42,7 +42,7 @@ main = do vfs <- makeVFSHandle ide <- initialise mainRule - (Just $ showEvent lock) + (showEvent lock) (makeOneHandle $ withLock lock . T.putStrLn) IdeOptions {optPreprocessor = (,) []