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