module GHC.Runtime.Eval.Types (
Resume(..), ResumeBindings, IcGlobalRdrEnv(..),
History(..), ExecResult(..),
SingleStep(..), isStep, ExecOptions(..)
) where
import GHC.Prelude
import GHCi.RemoteTypes
import GHCi.Message (EvalExpr, ResumeContext)
import GHC.Types.Id
import GHC.Types.Name
import GHC.Types.TyThing
import GHC.Types.Breakpoint
import GHC.Types.Name.Reader
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 InternalBreakpointId
breakPointId :: Maybe InternalBreakpointId
}
data IcGlobalRdrEnv = IcGlobalRdrEnv
{ IcGlobalRdrEnv -> GlobalRdrEnv
igre_env :: !GlobalRdrEnv
, IcGlobalRdrEnv -> GlobalRdrEnv
igre_prompt_env :: !GlobalRdrEnv
}
data Resume = Resume
{ Resume -> String
resumeStmt :: String
, Resume -> ForeignRef (ResumeContext [HValueRef])
resumeContext :: ForeignRef (ResumeContext [HValueRef])
, Resume -> ResumeBindings
resumeBindings :: ResumeBindings
, Resume -> [Id]
resumeFinalIds :: [Id]
, Resume -> ForeignHValue
resumeApStack :: ForeignHValue
, Resume -> Maybe InternalBreakpointId
resumeBreakpointId :: Maybe InternalBreakpointId
, Resume -> SrcSpan
resumeSpan :: SrcSpan
, Resume -> String
resumeDecl :: String
, Resume -> RemotePtr CostCentreStack
resumeCCS :: RemotePtr CostCentreStack
, Resume -> [History]
resumeHistory :: [History]
, Resume -> Int
resumeHistoryIx :: Int
}
type ResumeBindings = ([TyThing], IcGlobalRdrEnv)
data History = History
{ History -> ForeignHValue
historyApStack :: ForeignHValue
, History -> InternalBreakpointId
historyBreakpointId :: InternalBreakpointId
, History -> [String]
historyEnclosingDecls :: [String]
}