{- 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.MarkedString 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 as Row
import qualified Data.Row.Aeson as Aeson
import qualified Data.Row.Hashable as Hashable
import qualified Data.Text
import qualified Language.LSP.Protocol.Types.Common

{-# DEPRECATED MarkedString "use MarkupContent instead." #-}
{-|
MarkedString can be used to render human readable text. It is either a markdown string
or a code-block that provides a language and a code snippet. The language identifier
is semantically equal to the optional language identifier in fenced code blocks in GitHub
issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting

The pair of a language and a value is an equivalent to markdown:
```${language}
${value}
```

Note that markdown strings will be sanitized - that means html will be escaped.
@deprecated use MarkupContent instead.
-}
newtype MarkedString = MarkedString (Data.Text.Text Language.LSP.Protocol.Types.Common.|? (Row.Rec ("language" Row..== Data.Text.Text Row..+ ("value" Row..== Data.Text.Text Row..+ Row.Empty))))
  deriving newtype ([MarkedString] -> Encoding
[MarkedString] -> Value
MarkedString -> Encoding
MarkedString -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [MarkedString] -> Encoding
$ctoEncodingList :: [MarkedString] -> Encoding
toJSONList :: [MarkedString] -> Value
$ctoJSONList :: [MarkedString] -> Value
toEncoding :: MarkedString -> Encoding
$ctoEncoding :: MarkedString -> Encoding
toJSON :: MarkedString -> Value
$ctoJSON :: MarkedString -> Value
Aeson.ToJSON, Value -> Parser [MarkedString]
Value -> Parser MarkedString
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [MarkedString]
$cparseJSONList :: Value -> Parser [MarkedString]
parseJSON :: Value -> Parser MarkedString
$cparseJSON :: Value -> Parser MarkedString
Aeson.FromJSON)
  deriving stock (Int -> MarkedString -> ShowS
[MarkedString] -> ShowS
MarkedString -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MarkedString] -> ShowS
$cshowList :: [MarkedString] -> ShowS
show :: MarkedString -> String
$cshow :: MarkedString -> String
showsPrec :: Int -> MarkedString -> ShowS
$cshowsPrec :: Int -> MarkedString -> ShowS
Show, MarkedString -> MarkedString -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MarkedString -> MarkedString -> Bool
$c/= :: MarkedString -> MarkedString -> Bool
== :: MarkedString -> MarkedString -> Bool
$c== :: MarkedString -> MarkedString -> Bool
Eq, Eq MarkedString
MarkedString -> MarkedString -> Bool
MarkedString -> MarkedString -> Ordering
MarkedString -> MarkedString -> MarkedString
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 :: MarkedString -> MarkedString -> MarkedString
$cmin :: MarkedString -> MarkedString -> MarkedString
max :: MarkedString -> MarkedString -> MarkedString
$cmax :: MarkedString -> MarkedString -> MarkedString
>= :: MarkedString -> MarkedString -> Bool
$c>= :: MarkedString -> MarkedString -> Bool
> :: MarkedString -> MarkedString -> Bool
$c> :: MarkedString -> MarkedString -> Bool
<= :: MarkedString -> MarkedString -> Bool
$c<= :: MarkedString -> MarkedString -> Bool
< :: MarkedString -> MarkedString -> Bool
$c< :: MarkedString -> MarkedString -> Bool
compare :: MarkedString -> MarkedString -> Ordering
$ccompare :: MarkedString -> MarkedString -> Ordering
Ord, forall x. Rep MarkedString x -> MarkedString
forall x. MarkedString -> Rep MarkedString x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MarkedString x -> MarkedString
$cfrom :: forall x. MarkedString -> Rep MarkedString x
Generic)
  deriving anyclass (MarkedString -> ()
forall a. (a -> ()) -> NFData a
rnf :: MarkedString -> ()
$crnf :: MarkedString -> ()
NFData, Eq MarkedString
Int -> MarkedString -> Int
MarkedString -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: MarkedString -> Int
$chash :: MarkedString -> Int
hashWithSalt :: Int -> MarkedString -> Int
$chashWithSalt :: Int -> MarkedString -> Int
Hashable)
  deriving forall ann. [MarkedString] -> Doc ann
forall ann. MarkedString -> Doc ann
forall a.
(forall ann. a -> Doc ann)
-> (forall ann. [a] -> Doc ann) -> Pretty a
prettyList :: forall ann. [MarkedString] -> Doc ann
$cprettyList :: forall ann. [MarkedString] -> Doc ann
pretty :: forall ann. MarkedString -> Doc ann
$cpretty :: forall ann. MarkedString -> Doc ann
Pretty via (ViaJSON MarkedString)