on 8bce2dd help sign in
23 lines 984 B history raw
1-- Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
2-- SPDX-License-Identifier: Apache-2.0
3{-# LANGUAGE PatternSynonyms #-}
5module Development.IDE.LSP.Protocol
6 ( pattern EventFileDiagnostics
7 ) where
9import Development.IDE.Types.Diagnostics
10import Development.IDE.Types.Location
11import Language.Haskell.LSP.Messages
12import Language.Haskell.LSP.Types
14----------------------------------------------------------------------------------------------------
15-- Pretty printing
16----------------------------------------------------------------------------------------------------
18-- | Pattern synonym to make it a bit more convenient to match on diagnostics
19-- in things like damlc test.
20pattern EventFileDiagnostics :: FilePath -> [Diagnostic] -> FromServerMessage
21pattern EventFileDiagnostics fp diags <-
22 NotPublishDiagnostics
23 (NotificationMessage _ _ (PublishDiagnosticsParams (uriToFilePath' -> Just fp) (List diags)))