ghcitui-0.3.0.0: A Terminal User Interface (TUI) for GHCi
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ghcitui.Ghcid.ParseContext

Synopsis

Documentation

data NameBinding t Source #

Represents a binding in the local context.

Constructors

NameBinding 

Fields

Instances

Instances details
Show t => Show (NameBinding t) Source # 
Instance details

Defined in Ghcitui.NameBinding

Eq t => Eq (NameBinding t) Source # 
Instance details

Defined in Ghcitui.NameBinding

data BindingValue a Source #

Value associated with a binding.

Constructors

Uneval 
Evald a 

Instances

Instances details
Show a => Show (BindingValue a) Source # 
Instance details

Defined in Ghcitui.NameBinding

Eq a => Eq (BindingValue a) Source # 
Instance details

Defined in Ghcitui.NameBinding

parseContext :: Text -> ParseContextReturn Source #

Parse the output from ":show context" for the interpreter state.

parseBindings :: Text -> Either Text [NameBinding Text] Source #

Parse the output of ":show bindings".

parseShowBreaks Source #

Arguments

:: Text

Message to parse.

-> Either Text [(Int, ModuleLoc)]

Tuples are (breakpoint index, location).

Parse the output from ":show breaks"

parseShowModules :: Text -> Either ParseError [(Text, FilePath)] Source #

Parse the output of ":show modules".

isHistoryFailureMsg :: Text -> Bool Source #

Whether a given text line represents a failed history lookup.

cleanResponse :: [Text] -> Text Source #

Clean up GHCID exec returned messages/feedback.

Frequently, "exec" may include various GHCID prompts in its returned messages. Return only the last prompt output, which seems to include what we want fairly consistently.

Additionally, pack the lines into a single T.Text block.

newtype ParseError Source #

Type to describe parsing errors.

Constructors

ParseError Text 

Instances

Instances details
Show ParseError Source # 
Instance details

Defined in Ghcitui.Ghcid.ParseError

Eq ParseError Source # 
Instance details

Defined in Ghcitui.Ghcid.ParseError