sig
type position
val user_position : string -> int -> int -> int -> int -> Loc.position
val dummy_position : Loc.position
val get : Loc.position -> string * int * int * int * int
val join : Loc.position -> Loc.position -> Loc.position
val compare : Loc.position -> Loc.position -> int
val equal : Loc.position -> Loc.position -> bool
val hash : Loc.position -> int
val pp_position : Stdlib.Format.formatter -> Loc.position -> unit
val pp_position_no_file : Stdlib.Format.formatter -> Loc.position -> unit
val extract :
Stdlib.Lexing.position * Stdlib.Lexing.position -> Loc.position
val current_offset : int Stdlib.ref
val reloc : Stdlib.Lexing.position -> Stdlib.Lexing.position
val set_file : string -> Stdlib.Lexing.lexbuf -> unit
val transfer_loc : Stdlib.Lexing.lexbuf -> Stdlib.Lexing.lexbuf -> unit
type warning_id
val register_warning : string -> Pp.formatted -> Loc.warning_id
val warning :
Loc.warning_id ->
?loc:Loc.position ->
('b, Stdlib.Format.formatter, unit, unit) Stdlib.format4 -> 'b
val without_warning : Loc.warning_id -> (unit -> 'a) -> 'a
val disable_warning : Loc.warning_id -> unit
val set_warning_hook : (?loc:Loc.position -> string -> unit) -> unit
module Args :
sig
type spec = Getopt.opt
val desc_warning_list : Loc.Args.spec
val option_list : unit -> bool
val desc_no_warn : Loc.Args.spec
val set_flags_selected : ?silent:bool -> unit -> unit
end
exception Located of Loc.position * exn
val try1 : ?loc:Loc.position -> ('a -> 'b) -> 'a -> 'b
val try2 : ?loc:Loc.position -> ('a -> 'b -> 'c) -> 'a -> 'b -> 'c
val try3 :
?loc:Loc.position -> ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> 'c -> 'd
val try4 :
?loc:Loc.position ->
('a -> 'b -> 'c -> 'd -> 'e) -> 'a -> 'b -> 'c -> 'd -> 'e
val try5 :
?loc:Loc.position ->
('a -> 'b -> 'c -> 'd -> 'e -> 'f) -> 'a -> 'b -> 'c -> 'd -> 'e -> 'f
val try6 :
?loc:Loc.position ->
('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g) ->
'a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g
val try7 :
?loc:Loc.position ->
('a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h) ->
'a -> 'b -> 'c -> 'd -> 'e -> 'f -> 'g -> 'h
val error : ?loc:Loc.position -> exn -> 'a
exception Message of string
val errorm :
?loc:Loc.position ->
('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
val with_location :
(Stdlib.Lexing.lexbuf -> 'a) -> Stdlib.Lexing.lexbuf -> 'a
end