ghc-9.8.0.20230929: The GHC API
Safe HaskellNone
LanguageHaskell2010

GHC.Utils.Json

Synopsis

Documentation

data JsonDoc where Source #

Simple data type to represent JSON documents.

Constructors

JSNull :: JsonDoc 
JSBool :: Bool -> JsonDoc 
JSInt :: Int -> JsonDoc 
JSString 

Fields

JSArray :: [JsonDoc] -> JsonDoc 
JSObject :: [(String, JsonDoc)] -> JsonDoc 

class ToJson a where Source #

Methods

json :: a -> JsonDoc Source #

Instances

Instances details
ToJson MessageClass Source # 
Instance details

Defined in GHC.Types.Error

ToJson Severity Source # 
Instance details

Defined in GHC.Types.Error

ToJson RealSrcSpan Source # 
Instance details

Defined in GHC.Types.SrcLoc

ToJson SrcSpan Source # 
Instance details

Defined in GHC.Types.SrcLoc

Methods

json :: SrcSpan -> JsonDoc Source #

ToJson String Source # 
Instance details

Defined in GHC.Utils.Json

Methods

json :: String -> JsonDoc Source #

ToJson Int Source # 
Instance details

Defined in GHC.Utils.Json

Methods

json :: Int -> JsonDoc Source #