GHC.Runtime.Eval.Types

ghc-lib-parser-9.10.1.20250103: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Runtime.Eval.Types

Synopsis

- data Resume = Resume {
  - resumeStmt :: String
  - resumeContext :: ForeignRef (ResumeContext [HValueRef])
  - resumeBindings :: ResumeBindings
  - resumeFinalIds :: [Id]
  - resumeApStack :: ForeignHValue
  - resumeBreakInfo :: Maybe BreakInfo
  - resumeSpan :: SrcSpan
  - resumeDecl :: String
  - resumeCCS :: RemotePtr CostCentreStack
  - resumeHistory :: [History]
  - resumeHistoryIx :: Int
  }
- type ResumeBindings = ([TyThing], IcGlobalRdrEnv)
- data IcGlobalRdrEnv = IcGlobalRdrEnv {
  - igre_env :: !GlobalRdrEnv
  - igre_prompt_env :: !GlobalRdrEnv
  }
- data History = History {
  - historyApStack :: ForeignHValue
  - historyBreakInfo :: BreakInfo
  - historyEnclosingDecls :: [String]
  }
- data ExecResult
  - = ExecComplete {
    - execResult :: Either SomeException [Name]
    - execAllocation :: Word64
    }
  - | ExecBreak {
    - breakNames :: [Name]
    - breakInfo :: Maybe BreakInfo
    }
- data SingleStep
  - = RunToCompletion
  - | SingleStep
  - | RunAndLogSteps
- isStep :: SingleStep -> Bool
- data ExecOptions = ExecOptions {
  - execSingleStep :: SingleStep
  - execSourceFile :: String
  - execLineNumber :: Int
  - execWrap :: ForeignHValue -> EvalExpr ForeignHValue
  }

# Documentation

data Resume #

Constructors

Resume |
Fields resumeStmt :: String resumeContext :: ForeignRef (ResumeContext [HValueRef]) resumeBindings :: ResumeBindings resumeFinalIds :: [Id] resumeApStack :: ForeignHValue resumeBreakInfo :: Maybe BreakInfo resumeSpan :: SrcSpan resumeDecl :: String resumeCCS :: RemotePtr CostCentreStack resumeHistory :: [History] resumeHistoryIx :: Int

type ResumeBindings = ([TyThing], IcGlobalRdrEnv) #

data IcGlobalRdrEnv #

Essentially a GlobalRdrEnv, but with additional cached values to allow efficient re-calculation when the imports change. Fields are strict to avoid space leaks (see T4029) All operations are in GHC.Runtime.Context. See Note [icReaderEnv recalculation]

Constructors

IcGlobalRdrEnv |
Fields igre_env :: !GlobalRdrEnv The final environment igre_prompt_env :: !GlobalRdrEnv Just the things defined at the prompt (excluding imports!)

data History #

Constructors

History |
Fields historyApStack :: ForeignHValue historyBreakInfo :: BreakInfo historyEnclosingDecls :: [String]

data ExecResult #

Constructors

ExecComplete |
Fields execResult :: Either SomeException [Name] execAllocation :: Word64
ExecBreak |
Fields breakNames :: [Name] breakInfo :: Maybe BreakInfo

data SingleStep #

Constructors

RunToCompletion |
SingleStep |
RunAndLogSteps |

isStep :: SingleStep -> Bool #

data ExecOptions #

Constructors

ExecOptions |
Fields execSingleStep :: SingleStep stepping mode execSourceFile :: String filename (for errors) execLineNumber :: Int line number (for errors) execWrap :: ForeignHValue -> EvalExpr ForeignHValue