Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data ParseContextOut = ParseContextOut {
- func :: !Text
- filepath :: !FilePath
- pcSourceRange :: !SourceRange
- data ParseContextReturn
- data NameBinding t = NameBinding {
- bName :: t
- bType :: t
- bValue :: BindingValue t
- data BindingValue a
- parseContext :: Text -> ParseContextReturn
- parseBreakResponse :: Text -> Either Text [ModuleLoc]
- parseBindings :: Text -> Either Text [NameBinding Text]
- parseShowBreaks :: Text -> Either Text [(Int, ModuleLoc)]
- parseShowModules :: Text -> Either ParseError [(Text, FilePath)]
- isHistoryFailureMsg :: Text -> Bool
- cleanResponse :: [Text] -> Text
- newtype ParseError = ParseError Text
Documentation
data ParseContextOut Source #
Output record datatype for parseContext
.
ParseContextOut | |
|
Instances
Show ParseContextOut Source # | |
Defined in Ghcitui.Ghcid.ParseContext showsPrec :: Int -> ParseContextOut -> ShowS # show :: ParseContextOut -> String # showList :: [ParseContextOut] -> ShowS # | |
Eq ParseContextOut Source # | |
Defined in Ghcitui.Ghcid.ParseContext (==) :: ParseContextOut -> ParseContextOut -> Bool # (/=) :: ParseContextOut -> ParseContextOut -> Bool # |
data ParseContextReturn Source #
Instances
Show ParseContextReturn Source # | |
Defined in Ghcitui.Ghcid.ParseContext showsPrec :: Int -> ParseContextReturn -> ShowS # show :: ParseContextReturn -> String # showList :: [ParseContextReturn] -> ShowS # | |
Eq ParseContextReturn Source # | |
Defined in Ghcitui.Ghcid.ParseContext (==) :: ParseContextReturn -> ParseContextReturn -> Bool # (/=) :: ParseContextReturn -> ParseContextReturn -> Bool # |
data NameBinding t Source #
Represents a binding in the local context.
NameBinding | |
|
Instances
Show t => Show (NameBinding t) Source # | |
Defined in Ghcitui.NameBinding showsPrec :: Int -> NameBinding t -> ShowS # show :: NameBinding t -> String # showList :: [NameBinding t] -> ShowS # | |
Eq t => Eq (NameBinding t) Source # | |
Defined in Ghcitui.NameBinding (==) :: NameBinding t -> NameBinding t -> Bool # (/=) :: NameBinding t -> NameBinding t -> Bool # |
data BindingValue a Source #
Value associated with a binding.
Instances
Show a => Show (BindingValue a) Source # | |
Defined in Ghcitui.NameBinding showsPrec :: Int -> BindingValue a -> ShowS # show :: BindingValue a -> String # showList :: [BindingValue a] -> ShowS # | |
Eq a => Eq (BindingValue a) Source # | |
Defined in Ghcitui.NameBinding (==) :: BindingValue a -> BindingValue a -> Bool # (/=) :: BindingValue a -> BindingValue a -> Bool # |
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".
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.
Instances
Show ParseError Source # | |
Defined in Ghcitui.Ghcid.ParseError showsPrec :: Int -> ParseError -> ShowS # show :: ParseError -> String # showList :: [ParseError] -> ShowS # | |
Eq ParseError Source # | |
Defined in Ghcitui.Ghcid.ParseError (==) :: ParseError -> ParseError -> Bool # (/=) :: ParseError -> ParseError -> Bool # |