ghci-history-parser-0.1.0.0: parse output of ghci ":history" command

Safe HaskellSafe
LanguageHaskell98

GHCi.History.Parse.Common

Description

Grammar describing the output of ghci's :history command, usable by either Parsec or Text.ParserCombinators.ReadP.

Synopsis

Documentation

someSpace :: Parsing m => m () Source

num :: Parser Int Source

negNum :: Parser Int Source

negNum := '-' num

numSpan :: Parser (Int, Int) Source

numSpan := num '-' num

filePos :: Parser FilePos Source

filePos := '(' num ',' num ')'

unabbrevPosRange :: Parser (FilePos, FilePos) Source

unabbrevPosRange := '(' filePos ')-(' filePos ')'

abbrevPosRange :: Parser (FilePos, FilePos) Source

abbrevPosRange :=  num ':' num '-' num

posRange :: (Monad f, Parsing f) => f (FilePos, FilePos) Source

filename :: Parser String Source

funcname :: Parser String Source

discards terminal control codes

histLine :: Parser HistoryItem Source

histLine := negNum ':' funcname '(' filename ':' posRange ')'

nonEmptyHistory :: (Monad m, Parsing m) => m [HistoryItem] Source

history :: (Monad f, Parsing f) => f [HistoryItem] Source