My agentic slop goes here. Not intended for anyone else!
1(** Error handling for geographic coordinates *)
2
3type t =
4 | Invalid_latitude of float
5 | Invalid_longitude of float
6 | Parse_error of string
7 | Invalid_format of string
8 | Invalid_hemisphere of string
9
10exception Coordinate_error of t
11
12val to_string : t -> string
13
14(** Error handling combinators *)
15val catch : ('a -> 'b) -> 'a -> ('b, t) result
16val catch_exn : ('a -> 'b) -> 'a -> 'b option
17val unwrap : ('a, t) result -> 'a
18val unwrap_or : 'a -> ('a, t) result -> 'a