HaXml-1.20.1: Utilities for manipulating XML documentsSource codeContentsIndex
Position type
Constructors of a new position
Define a position datatype for giving locations in error messages.
data Posn
posInNewCxt :: String -> Maybe Posn -> Posn
noPos :: Posn
forcep :: Posn -> Int
addcol :: Int -> Posn -> Posn
newline :: Posn -> Posn
tab :: Posn -> Posn
white :: Char -> Posn -> Posn
posnFilename :: Posn -> FilePath
posnLine :: Posn -> Int
posnColumn :: Posn -> Int
Position type
data Posn Source
Source positions contain a filename, line, column, and an inclusion point, which is itself another source position, recursively.
show/hide Instances
Constructors of a new position
posInNewCxt :: String -> Maybe Posn -> PosnSource
posInNewCxt name pos creates a new source position from an old one. It is used when opening a new file (e.g. a DTD inclusion), to denote the start of the file name, but retain the stacked information that it was included from the old pos.
noPos :: PosnSource
Dummy value for generated data, where a true source position does not exist.
forcep :: Posn -> IntSource
Just used to strictify the internal values of a position, to avoid space leaks.
addcol :: Int -> Posn -> PosnSource
Add n character positions to the given position.
newline :: Posn -> PosnSource
tab :: Posn -> PosnSource
Add a newline or tab to the given position.
white :: Char -> Posn -> PosnSource
Add the given whitespace char to the given position. Precondition: white c | isSpace c = True
posnFilename :: Posn -> FilePathSource
posnLine :: Posn -> IntSource
posnColumn :: Posn -> IntSource
Produced by Haddock version 2.6.0