{- 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.Definition 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.Location
import qualified Language.LSP.Protocol.Types.Common

{-|
The definition of a symbol represented as one or many `Location`.
For most programming languages there is only one location at which a symbol is
defined.

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