ghc-9.15: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.HsToCore.Breakpoints

Description

Information attached to Breakpoints generated from Ticks

The breakpoint information stored in ModBreaks is generated during desugaring from the ticks annotating the source expressions.

This information can be queried per-breakpoint using the BreakpointId datatype, which indexes tick-level breakpoint information.

ModBreaks and BreakpointIds are not to be confused with InternalModBreaks and InternalBreakIds. The latter are constructed during bytecode generation and can be found in Breakpoints.

See Note [Breakpoint identifiers]

Synopsis

ModBreaks

mkModBreaks Source #

Arguments

:: Bool

Whether the interpreter is profiled and thus if we should include store a CCS array

-> Module 
-> SizedSeq Tick 
-> ModBreaks 

Initialize memory for breakpoint data that is shared between the bytecode generator and the interpreter.

Since GHCi and the RTS need to interact with breakpoint data and the bytecode generator needs to encode this information for each expression, the data is allocated remotely in GHCi's address space and passed to the codegen as foreign pointers.

data ModBreaks Source #

All the information about the source-relevant breakpoints for a module

This information is constructed once during desugaring (with mkModBreaks) from breakpoint ticks and fixed/unchanged from there on forward. It could be exported as an abstract datatype because it should never be updated after construction, only queried.

The arrays can be indexed using the int in the corresponding BreakpointId (i.e. the BreakpointId whose Module matches the Module corresponding to these ModBreaks) with the accessors modBreaks_locs, modBreaks_vars, and modBreaks_decls.

Constructors

ModBreaks 

Fields

Re-exports BreakpointId

data BreakpointId Source #

Breakpoint identifier.

Indexes into the structures in the ModBreaks created during desugaring (after inserting the breakpoint ticks in the expressions). See Note [Breakpoint identifiers]

Constructors

BreakpointId 

Fields

Instances

Instances details
NFData BreakpointId Source # 
Instance details

Defined in GHC.Types.Tickish

Methods

rnf :: BreakpointId -> () Source #

Outputable BreakpointId Source # 
Instance details

Defined in GHC.Types.Tickish

Eq BreakpointId Source # 
Instance details

Defined in GHC.Types.Tickish

Ord BreakpointId Source # 
Instance details

Defined in GHC.Types.Tickish

Data BreakpointId Source # 
Instance details

Defined in GHC.Types.Tickish

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BreakpointId -> c BreakpointId Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BreakpointId Source #

toConstr :: BreakpointId -> Constr Source #

dataTypeOf :: BreakpointId -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BreakpointId) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BreakpointId) Source #

gmapT :: (forall b. Data b => b -> b) -> BreakpointId -> BreakpointId Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BreakpointId -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BreakpointId -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> BreakpointId -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BreakpointId -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BreakpointId -> m BreakpointId Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BreakpointId -> m BreakpointId Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BreakpointId -> m BreakpointId Source #

type BreakTickIndex = Int Source #

Breakpoint tick index newtype BreakTickIndex = BreakTickIndex Int deriving (Eq, Ord, Data, Ix, NFData, Outputable)