The standard library Line_Number_Db api defines functionality for tracking regions in source-code files, primarily for issuing error messages.
The Line_Number_Db api is implemented by the line_number_db package.
The Line_Number_Db api source code is in src/lib/compiler/front/basics/source/line-number-db.api.
The above information is manually maintained and may contain errors.
api { Charpos; Pair X; Source_Code_Region; span : (Source_Code_Region , Source_Code_Region) -> Source_Code_Region; null_region : Source_Code_Region; Sourceloc; Sourcemap; newmap : (Charpos , Sourceloc) -> Sourcemap; newline : Sourcemap -> Charpos -> Void; resynch : Sourcemap -> (Charpos , {column:Null_Or(Int ), file_name:Null_Or(String ), line:Int}) -> Void; forget_old_positions : Sourcemap -> Void; filepos : Sourcemap -> Charpos -> Sourceloc; fileregion : Sourcemap -> Source_Code_Region -> List(Pair(Sourceloc ) ); positions : Sourcemap -> Sourceloc -> List(Charpos ); last_change : Sourcemap -> Charpos; newline_count : Sourcemap -> Source_Code_Region -> Int;};