ghc-lib-parser-9.12.2.20250421: 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
  - resumeBreakpointId :: Maybe InternalBreakpointId
  - 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
  - historyBreakpointId :: InternalBreakpointId
  - historyEnclosingDecls :: [String]
  }
- data ExecResult
  - = ExecComplete {
    - execResult :: Either SomeException [Name]
    - execAllocation :: Word64
    }
  - | ExecBreak {
    - breakNames :: [Name]
    - breakPointId :: Maybe InternalBreakpointId
    }
- data SingleStep
  - = RunToCompletion
  - | SingleStep
  - | RunAndLogSteps
- isStep :: SingleStep -> Bool
- data ExecOptions = ExecOptions {
  - execSingleStep :: SingleStep
  - execSourceFile :: String
  - execLineNumber :: Int
  - execWrap :: ForeignHValue -> EvalExpr ForeignHValue
  }

# Documentation

data Resume Source #

Constructors

Resume |

Fields

- resumeStmt :: String
- resumeContext :: ForeignRef (ResumeContext [HValueRef])
- resumeBindings :: ResumeBindings
- resumeFinalIds :: [Id]
- resumeApStack :: ForeignHValue
- resumeBreakpointId :: Maybe InternalBreakpointId

  the breakpoint we stopped at (Nothing = exception)

- resumeSpan :: SrcSpan
- resumeDecl :: String
- resumeCCS :: RemotePtr CostCentreStack
- resumeHistory :: [History]
- resumeHistoryIx :: Int

type ResumeBindings = ([TyThing], IcGlobalRdrEnv) Source #

data IcGlobalRdrEnv Source #

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 Source #

Constructors

History |

Fields

- historyApStack :: ForeignHValue
- historyBreakpointId :: InternalBreakpointId

  breakpoint identifier

- historyEnclosingDecls :: [String]

  declarations enclosing the breakpoint

data ExecResult Source #

Constructors

ExecComplete |

Fields

- execResult :: Either SomeException [Name]
- execAllocation :: Word64

ExecBreak |

Fields

- breakNames :: [Name]
- breakPointId :: Maybe InternalBreakpointId

data SingleStep Source #

Constructors

RunToCompletion |
SingleStep |
RunAndLogSteps |

isStep :: SingleStep -> Bool Source #

data ExecOptions Source #

Constructors

ExecOptions |

Fields

- execSingleStep :: SingleStep

  stepping mode

- execSourceFile :: String

  filename (for errors)

- execLineNumber :: Int

  line number (for errors)

- execWrap :: ForeignHValue -> EvalExpr ForeignHValue