Punycode (RFC3492) in OCaml

errors

+12
+3
lib/punycode.ml
··· 61 61 | Empty_label -> 62 62 Format.fprintf fmt "empty label" 63 63 64 + let error_to_string err = 65 + Format.asprintf "%a" pp_error err 66 + 64 67 (* {1 Error Constructors} *) 65 68 66 69 let overflow pos = Error (Overflow pos)
+3
lib/punycode.mli
··· 70 70 val pp_error : Format.formatter -> error -> unit 71 71 (** [pp_error fmt e] pretty-prints an error with position information. *) 72 72 73 + val error_to_string : error -> string 74 + (** [error_to_string e] converts an error to a human-readable string. *) 75 + 73 76 (** {1 Constants} 74 77 75 78 Punycode parameters as specified in
+3
lib/punycode_idna.ml
··· 28 28 | Verification_failed -> 29 29 Format.fprintf fmt "IDNA verification failed (round-trip mismatch)" 30 30 31 + let error_to_string err = 32 + Format.asprintf "%a" pp_error err 33 + 31 34 (* {1 Error Constructors} *) 32 35 33 36 let punycode_error e = Error (Punycode_error e)
+3
lib/punycode_idna.mli
··· 53 53 val pp_error : Format.formatter -> error -> unit 54 54 (** [pp_error fmt e] pretty-prints an error. *) 55 55 56 + val error_to_string : error -> string 57 + (** [error_to_string e] converts an error to a human-readable string. *) 58 + 56 59 (** {1 Constants} *) 57 60 58 61 val max_domain_length : int