phoityne-vscode-0.0.1.0: app/Phoityne/IO/GUI/VSCode/TH/EvaluateBodyJSON.hs
{-# LANGUAGE TemplateHaskell #-}
module Phoityne.IO.GUI.VSCode.TH.EvaluateBodyJSON where
import Data.Aeson.TH
import Phoityne.Utility
-- |
-- Response to "evaluate" request.
--
data EvaluateBody =
EvaluateBody {
resultEvaluateBody :: String -- The result of the evaluate.
, variablesReferenceEvaluateBody :: Int -- If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest
} deriving (Show, Read, Eq)
$(deriveJSON defaultOptions { fieldLabelModifier = rdrop (length "EvaluateBody") } ''EvaluateBody)
-- |
--
defaultEvaluateBody :: EvaluateBody
defaultEvaluateBody = EvaluateBody "" 0