{- 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] -> Value
[DeclarationLink] -> Encoding
DeclarationLink -> Bool
DeclarationLink -> Value
DeclarationLink -> Encoding
(DeclarationLink -> Value)
-> (DeclarationLink -> Encoding)
-> ([DeclarationLink] -> Value)
-> ([DeclarationLink] -> Encoding)
-> (DeclarationLink -> Bool)
-> ToJSON DeclarationLink
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> (a -> Bool)
-> ToJSON a
$ctoJSON :: DeclarationLink -> Value
toJSON :: DeclarationLink -> Value
$ctoEncoding :: DeclarationLink -> Encoding
toEncoding :: DeclarationLink -> Encoding
$ctoJSONList :: [DeclarationLink] -> Value
toJSONList :: [DeclarationLink] -> Value
$ctoEncodingList :: [DeclarationLink] -> Encoding
toEncodingList :: [DeclarationLink] -> Encoding
$comitField :: DeclarationLink -> Bool
omitField :: DeclarationLink -> Bool
Aeson.ToJSON, Maybe DeclarationLink
Value -> Parser [DeclarationLink]
Value -> Parser DeclarationLink
(Value -> Parser DeclarationLink)
-> (Value -> Parser [DeclarationLink])
-> Maybe DeclarationLink
-> FromJSON DeclarationLink
forall a.
(Value -> Parser a)
-> (Value -> Parser [a]) -> Maybe a -> FromJSON a
$cparseJSON :: Value -> Parser DeclarationLink
parseJSON :: Value -> Parser DeclarationLink
$cparseJSONList :: Value -> Parser [DeclarationLink]
parseJSONList :: Value -> Parser [DeclarationLink]
$comittedField :: Maybe DeclarationLink
omittedField :: Maybe DeclarationLink
Aeson.FromJSON)
  deriving stock (Int -> DeclarationLink -> ShowS
[DeclarationLink] -> ShowS
DeclarationLink -> String
(Int -> DeclarationLink -> ShowS)
-> (DeclarationLink -> String)
-> ([DeclarationLink] -> ShowS)
-> Show DeclarationLink
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeclarationLink -> ShowS
showsPrec :: Int -> DeclarationLink -> ShowS
$cshow :: DeclarationLink -> String
show :: DeclarationLink -> String
$cshowList :: [DeclarationLink] -> ShowS
showList :: [DeclarationLink] -> ShowS
Show, DeclarationLink -> DeclarationLink -> Bool
(DeclarationLink -> DeclarationLink -> Bool)
-> (DeclarationLink -> DeclarationLink -> Bool)
-> Eq DeclarationLink
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeclarationLink -> DeclarationLink -> Bool
== :: DeclarationLink -> DeclarationLink -> Bool
$c/= :: DeclarationLink -> DeclarationLink -> Bool
/= :: DeclarationLink -> DeclarationLink -> Bool
Eq, Eq DeclarationLink
Eq DeclarationLink =>
(DeclarationLink -> DeclarationLink -> Ordering)
-> (DeclarationLink -> DeclarationLink -> Bool)
-> (DeclarationLink -> DeclarationLink -> Bool)
-> (DeclarationLink -> DeclarationLink -> Bool)
-> (DeclarationLink -> DeclarationLink -> Bool)
-> (DeclarationLink -> DeclarationLink -> DeclarationLink)
-> (DeclarationLink -> DeclarationLink -> DeclarationLink)
-> Ord 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
$ccompare :: DeclarationLink -> DeclarationLink -> Ordering
compare :: DeclarationLink -> DeclarationLink -> Ordering
$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
>= :: DeclarationLink -> DeclarationLink -> Bool
$cmax :: DeclarationLink -> DeclarationLink -> DeclarationLink
max :: DeclarationLink -> DeclarationLink -> DeclarationLink
$cmin :: DeclarationLink -> DeclarationLink -> DeclarationLink
min :: DeclarationLink -> DeclarationLink -> DeclarationLink
Ord, (forall x. DeclarationLink -> Rep DeclarationLink x)
-> (forall x. Rep DeclarationLink x -> DeclarationLink)
-> Generic DeclarationLink
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
$cfrom :: forall x. DeclarationLink -> Rep DeclarationLink x
from :: forall x. DeclarationLink -> Rep DeclarationLink x
$cto :: forall x. Rep DeclarationLink x -> DeclarationLink
to :: forall x. Rep DeclarationLink x -> DeclarationLink
Generic)
  deriving anyclass (DeclarationLink -> ()
(DeclarationLink -> ()) -> NFData DeclarationLink
forall a. (a -> ()) -> NFData a
$crnf :: DeclarationLink -> ()
rnf :: DeclarationLink -> ()
NFData, Eq DeclarationLink
Eq DeclarationLink =>
(Int -> DeclarationLink -> Int)
-> (DeclarationLink -> Int) -> Hashable DeclarationLink
Int -> DeclarationLink -> Int
DeclarationLink -> Int
forall a. Eq a => (Int -> a -> Int) -> (a -> Int) -> Hashable a
$chashWithSalt :: Int -> DeclarationLink -> Int
hashWithSalt :: Int -> DeclarationLink -> Int
$chash :: DeclarationLink -> Int
hash :: DeclarationLink -> Int
Hashable)
  deriving (forall ann. DeclarationLink -> Doc ann)
-> (forall ann. [DeclarationLink] -> Doc ann)
-> Pretty DeclarationLink
forall ann. [DeclarationLink] -> Doc ann
forall ann. DeclarationLink -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
$cpretty :: forall ann. DeclarationLink -> Doc ann
pretty :: forall ann. DeclarationLink -> Doc ann
$cprettyList :: forall ann. [DeclarationLink] -> Doc ann
prettyList :: forall ann. [DeclarationLink] -> Doc ann
Pretty via (ViaJSON DeclarationLink)