module GHC.Runtime.Eval.Types (
Resume(..), History(..), ExecResult(..),
SingleStep(..), isStep, ExecOptions(..),
BreakInfo(..)
) where
import GHC.Prelude
import GHCi.RemoteTypes
import GHCi.Message (EvalExpr, ResumeContext)
import GHC.Types.Id
import GHC.Types.Name
import GHC.Unit.Module
import GHC.Types.Name.Reader
import GHC.Core.Type
import GHC.Types.SrcLoc
import GHC.Utils.Exception
import Data.Word
import GHC.Stack.CCS
data ExecOptions
= ExecOptions
{ ExecOptions -> SingleStep
execSingleStep :: SingleStep
, ExecOptions -> String
execSourceFile :: String
, ExecOptions -> Int
execLineNumber :: Int
, ExecOptions -> ForeignHValue -> EvalExpr ForeignHValue
execWrap :: ForeignHValue -> EvalExpr ForeignHValue
}
data SingleStep
= RunToCompletion
| SingleStep
| RunAndLogSteps
isStep :: SingleStep -> Bool
isStep :: SingleStep -> Bool
isStep SingleStep
RunToCompletion = Bool
False
isStep SingleStep
_ = Bool
True
data ExecResult
= ExecComplete
{ ExecResult -> Either SomeException [Name]
execResult :: Either SomeException [Name]
, ExecResult -> Word64
execAllocation :: Word64
}
| ExecBreak
{ ExecResult -> [Name]
breakNames :: [Name]
, ExecResult -> Maybe BreakInfo
breakInfo :: Maybe BreakInfo
}
data BreakInfo = BreakInfo
{ BreakInfo -> Module
breakInfo_module :: Module
, BreakInfo -> Int
breakInfo_number :: Int
}
data Resume = Resume
{ Resume -> String
resumeStmt :: String
, Resume -> ForeignRef (ResumeContext [HValueRef])
resumeContext :: ForeignRef (ResumeContext [HValueRef])
, Resume -> ([TyThing], GlobalRdrEnv)
resumeBindings :: ([TyThing], GlobalRdrEnv)
, Resume -> [Id]
resumeFinalIds :: [Id]
, Resume -> ForeignHValue
resumeApStack :: ForeignHValue
, Resume -> Maybe BreakInfo
resumeBreakInfo :: Maybe BreakInfo
, Resume -> SrcSpan
resumeSpan :: SrcSpan
, Resume -> String
resumeDecl :: String
, Resume -> RemotePtr CostCentreStack
resumeCCS :: RemotePtr CostCentreStack
, Resume -> [History]
resumeHistory :: [History]
, Resume -> Int
resumeHistoryIx :: Int
}
data History
= History {
History -> ForeignHValue
historyApStack :: ForeignHValue,
History -> BreakInfo
historyBreakInfo :: BreakInfo,
History -> [String]
historyEnclosingDecls :: [String]
}