| 1 |
(* Locations in source file,
|
| 2 |
and presentation of results and errors *)
|
| 3 |
|
| 4 |
type loc = int * int
|
| 5 |
exception Location of loc * exn
|
| 6 |
exception Generic of string
|
| 7 |
val noloc:loc
|
| 8 |
|
| 9 |
val raise_generic: string -> 'a
|
| 10 |
val raise_loc_generic: loc -> string -> 'a
|
| 11 |
|
| 12 |
type source = [ `None | `File of string | `Stream | `String of string ]
|
| 13 |
val set_source: source -> unit
|
| 14 |
|
| 15 |
type viewport = [ `Html | `Text ]
|
| 16 |
val set_viewport: viewport -> unit
|
| 17 |
|
| 18 |
val protect: Format.formatter -> (Format.formatter -> unit) -> unit
|
| 19 |
|
| 20 |
val print_loc: Format.formatter -> loc -> unit
|
| 21 |
val dump_loc: Format.formatter -> loc -> unit
|
| 22 |
val html_hilight: Format.formatter -> loc -> unit
|
| 23 |
|
| 24 |
type 'a located = { loc : loc; descr : 'a }
|
| 25 |
val mk: loc -> 'a -> 'a located
|