haskell-debugger
Safe HaskellNone
LanguageGHC2021

GHC.Debugger.Runtime.Eval

Description

Higher-level interface to evaluating things in the (possibly remote) debuggee process

Synopsis

Raw evaluation

evalExpr :: EvalExpr ForeignHValue -> Debugger (Either BadEvalStatus [ForeignHValue]) Source #

Evaluate a raw EvalExpr which represents a debuggee expression of type IO [a]

evalString :: ForeignRef (IO String) -> Debugger String Source #

Evaluate a foreign value of type IO String to a String

Error handling

handleSingStatus :: Either BadEvalStatus [ForeignHValue] -> Either BadEvalStatus ForeignHValue Source #

Handle the EvalStatus_ of an evaluation using EvalStepNone which returns a single value

Re-exports

data EvalExpr a #

We can pass simple expressions to EvalStmt, consisting of values and application. This allows us to wrap the statement to be executed in another function, which is used by GHCi to implement :set args and :set prog. It might be worthwhile to extend this little language in the future.

Constructors

EvalThis a 
EvalApp (EvalExpr a) (EvalExpr a) 

Instances

Instances details
Binary a => Binary (EvalExpr a) # 
Instance details

Defined in GHCi.Message

Methods

put :: EvalExpr a -> Put #

get :: Get (EvalExpr a) #

putList :: [EvalExpr a] -> Put #

Generic (EvalExpr a) # 
Instance details

Defined in GHCi.Message

Associated Types

type Rep (EvalExpr a) 
Instance details

Defined in GHCi.Message

Methods

from :: EvalExpr a -> Rep (EvalExpr a) x #

to :: Rep (EvalExpr a) x -> EvalExpr a #

Show a => Show (EvalExpr a) # 
Instance details

Defined in GHCi.Message

Methods

showsPrec :: Int -> EvalExpr a -> ShowS #

show :: EvalExpr a -> String #

showList :: [EvalExpr a] -> ShowS #

type Rep (EvalExpr a) # 
Instance details

Defined in GHCi.Message