OASISUtilsVarious utilities
module MapExt : sig ... endmodule SetExt : sig ... endmodule SetStringCsl : SetExt.S with type elt = String.tSet for String.
module HashStringCsl : Hashtbl.S with type key = String.tCaseless string hashtable
varname_of_string ~hyphen:c s Transform a string s into a variable name, following this convention: no digit at the beginning, lowercase, only a-z and 0-9 chars. Whenever there is a problem, use an hyphen.
varname_concat ~hyphen p s Concat variable name, removing hyphen at end of p and at beginning of s.
is_varname str Check that the string str is a valid varname. See varname_of_string for definition.
val failwithf : ('a, unit, string, 'b) format4 -> 'aThis function raises the Failure exception just as failwith except that one specifies the string raised through a format string.
Example: failwithf "Cannot do %s because of %d" str i
val file_location :
?pos1:Lexing.position ->
?pos2:Lexing.position ->
?lexbuf:Lexing.lexbuf ->
unit ->
stringThis function returns a string describing a position in a file, to locate an error. The format of the string is compatible with OCaml compilation location format.
val failwithpf :
?pos1:Lexing.position ->
?pos2:Lexing.position ->
?lexbuf:Lexing.lexbuf ->
('a, unit, string, 'b) format4 ->
'aThis function raises the Failure exception just as failwith except that one specifies the string raised through a format string and locate the error using lexbuf in the source file.
Example: failwithpf lexbuf "Cannot do %s because of %d" str i
module POSIXShell : sig ... end