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