Skip to content

Commit

Permalink
Added some CPP to suppress incomplete-patterns warning in dhall-lsp-s…
Browse files Browse the repository at this point in the history
…erver package
  • Loading branch information
mmhat committed Nov 7, 2024
1 parent bd5d91e commit 0958014
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dhall-lsp-server/src/Dhall/LSP/Handlers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 4 additions & 0 deletions dhall-lsp-server/src/Dhall/LSP/Server.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ExplicitNamespaces #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RecordWildCards #-}
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 0958014

Please sign in to comment.