let to_string t =
if Option.is_none t.file && Option.is_none t.line && Option.is_none t.col then
"unknown_position"
else
let f =
match t.file with
None -> ""
| Some s -> (match t.line with None -> s | Some _ -> s ^ ":")
in
let l =
match t.line with
None -> ""
| Some k -> (match t.col with None -> string_of_int k | Some _ -> string_of_int k ^ ".")
in
let c =
match t.col with
None -> ""
| Some k -> string_of_int k
in
f ^ l ^ c