Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- Locations of elements in a text file
- Writing locations
Synopsis
- data L t = L Line_and_char t
- data Line_and_char
- init_line_and_char :: Line_and_char
- next_char :: Line_and_char -> Line_and_char
- next_line :: Line_and_char -> Line_and_char
- write_line_and_char :: Line_and_char -> String
Documentation
Add a location to any type.
data Line_and_char Source #
The location of an element in a text file.
Instances
Eq Line_and_char Source # | |
Defined in Parser.Line_and_char (==) :: Line_and_char -> Line_and_char -> Bool # (/=) :: Line_and_char -> Line_and_char -> Bool # | |
Ord Line_and_char Source # | |
Defined in Parser.Line_and_char compare :: Line_and_char -> Line_and_char -> Ordering # (<) :: Line_and_char -> Line_and_char -> Bool # (<=) :: Line_and_char -> Line_and_char -> Bool # (>) :: Line_and_char -> Line_and_char -> Bool # (>=) :: Line_and_char -> Line_and_char -> Bool # max :: Line_and_char -> Line_and_char -> Line_and_char # min :: Line_and_char -> Line_and_char -> Line_and_char # | |
Show Line_and_char Source # | |
Defined in Parser.Line_and_char showsPrec :: Int -> Line_and_char -> ShowS # show :: Line_and_char -> String # showList :: [Line_and_char] -> ShowS # |
init_line_and_char :: Line_and_char Source #
First line, first character.
next_char :: Line_and_char -> Line_and_char Source #
Move one character to the right.
next_line :: Line_and_char -> Line_and_char Source #
Move to the beginning of the next line.
write_line_and_char :: Line_and_char -> String Source #
Write the location with a colon between line and character number.