{- ORMOLU_DISABLE -}
{- HLINT ignore -}
-- THIS IS A GENERATED FILE, DO NOT EDIT

{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
module Language.LSP.Protocol.Internal.Types.DeclarationLink where

import Control.DeepSeq
import Data.Hashable
import GHC.Generics
import Language.LSP.Protocol.Utils.Misc
import Prettyprinter
import qualified Data.Aeson as Aeson
import qualified Data.Row.Aeson as Aeson
import qualified Data.Row.Hashable as Hashable
import qualified Language.LSP.Protocol.Internal.Types.LocationLink

{-|
Information about where a symbol is declared.

Provides additional metadata over normal `Location` declarations, including the range of
the declaring symbol.

Servers should prefer returning `DeclarationLink` over `Declaration` if supported
by the client.
-}
newtype DeclarationLink = DeclarationLink Language.LSP.Protocol.Internal.Types.LocationLink.LocationLink
  deriving newtype ([DeclarationLink] -> Encoding
[DeclarationLink] -> Value
DeclarationLink -> Encoding
DeclarationLink -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [DeclarationLink] -> Encoding
$ctoEncodingList :: [DeclarationLink] -> Encoding
toJSONList :: [DeclarationLink] -> Value
$ctoJSONList :: [DeclarationLink] -> Value
toEncoding :: DeclarationLink -> Encoding
$ctoEncoding :: DeclarationLink -> Encoding
toJSON :: DeclarationLink -> Value
$ctoJSON :: DeclarationLink -> Value
Aeson.ToJSON, Value -> Parser [DeclarationLink]
Value -> Parser DeclarationLink
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [DeclarationLink]
$cparseJSONList :: Value -> Parser [DeclarationLink]
parseJSON :: Value -> Parser DeclarationLink
$cparseJSON :: Value -> Parser DeclarationLink
Aeson.FromJSON)
  deriving stock (Int -> DeclarationLink -> ShowS
[DeclarationLink] -> ShowS
DeclarationLink -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeclarationLink] -> ShowS
$cshowList :: [DeclarationLink] -> ShowS
show :: DeclarationLink -> String
$cshow :: DeclarationLink -> String
showsPrec :: Int -> DeclarationLink -> ShowS
$cshowsPrec :: Int -> DeclarationLink -> ShowS
Show, DeclarationLink -> DeclarationLink -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeclarationLink -> DeclarationLink -> Bool
$c/= :: DeclarationLink -> DeclarationLink -> Bool
== :: DeclarationLink -> DeclarationLink -> Bool
$c== :: DeclarationLink -> DeclarationLink -> Bool
Eq, Eq DeclarationLink
DeclarationLink -> DeclarationLink -> Bool
DeclarationLink -> DeclarationLink -> Ordering
DeclarationLink -> DeclarationLink -> DeclarationLink
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: DeclarationLink -> DeclarationLink -> DeclarationLink
$cmin :: DeclarationLink -> DeclarationLink -> DeclarationLink
max :: DeclarationLink -> DeclarationLink -> DeclarationLink
$cmax :: DeclarationLink -> DeclarationLink -> DeclarationLink
>= :: DeclarationLink -> DeclarationLink -> Bool
$c>= :: DeclarationLink -> DeclarationLink -> Bool
> :: DeclarationLink -> DeclarationLink -> Bool
$c> :: DeclarationLink -> DeclarationLink -> Bool
<= :: DeclarationLink -> DeclarationLink -> Bool
$c<= :: DeclarationLink -> DeclarationLink -> Bool
< :: DeclarationLink -> DeclarationLink -> Bool
$c< :: DeclarationLink -> DeclarationLink -> Bool
compare :: DeclarationLink -> DeclarationLink -> Ordering
$ccompare :: DeclarationLink -> DeclarationLink -> Ordering
Ord, forall x. Rep DeclarationLink x -> DeclarationLink
forall x. DeclarationLink -> Rep DeclarationLink x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeclarationLink x -> DeclarationLink
$cfrom :: forall x. DeclarationLink -> Rep DeclarationLink x
Generic)
  deriving anyclass (DeclarationLink -> ()
forall a. (a -> ()) -> NFData a
rnf :: DeclarationLink -> ()
$crnf :: DeclarationLink -> ()
NFData, Eq DeclarationLink
Int -> DeclarationLink -> Int
DeclarationLink -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: DeclarationLink -> Int
$chash :: DeclarationLink -> Int
hashWithSalt :: Int -> DeclarationLink -> Int
$chashWithSalt :: Int -> DeclarationLink -> Int
Hashable)
  deriving forall ann. [DeclarationLink] -> Doc ann
forall ann. DeclarationLink -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [DeclarationLink] -> Doc ann
$cprettyList :: forall ann. [DeclarationLink] -> Doc ann
pretty :: forall ann. DeclarationLink -> Doc ann
$cpretty :: forall ann. DeclarationLink -> Doc ann
Pretty via (ViaJSON DeclarationLink)