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