diff --git a/dhall-lsp-server/src/Dhall/LSP/Handlers.hs b/dhall-lsp-server/src/Dhall/LSP/Handlers.hs index ba4efbd9c..1ffdc5bd8 100644 --- a/dhall-lsp-server/src/Dhall/LSP/Handlers.hs +++ b/dhall-lsp-server/src/Dhall/LSP/Handlers.hs @@ -679,6 +679,9 @@ handleErrorWithDefault respond _default = flip catchE handler Error -> MessageType_Error Warning -> MessageType_Warning Info -> MessageType_Info +#if !MIN_TOOL_VERSION_ghc(9,2,0) + Log -> MessageType_Log +#endif liftLSP $ LSP.sendNotification SMethod_WindowShowMessage ShowMessageParams{..} respond (Right _default) diff --git a/dhall-lsp-server/src/Dhall/LSP/Server.hs b/dhall-lsp-server/src/Dhall/LSP/Server.hs index f11155385..aec8c4311 100644 --- a/dhall-lsp-server/src/Dhall/LSP/Server.hs +++ b/dhall-lsp-server/src/Dhall/LSP/Server.hs @@ -1,4 +1,5 @@ {-# LANGUAGE BlockArguments #-} +{-# LANGUAGE CPP #-} {-# LANGUAGE ExplicitNamespaces #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} @@ -126,6 +127,9 @@ runWith settings = withLogger $ \ioLogger -> do Error -> MessageType_Error Warning -> MessageType_Warning Info -> MessageType_Info +#if !MIN_TOOL_VERSION_ghc(9,2,0) + Log -> MessageType_Log +#endif LSP.sendNotification SMethod_WindowShowMessage ShowMessageParams{..} liftIO (fail (Text.unpack _message))