summaryrefslogtreecommitdiffstats
path: root/lib/iban.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/iban.ml')
-rw-r--r--lib/iban.ml11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/iban.ml b/lib/iban.ml
index fbea774..9b516c4 100644
--- a/lib/iban.ml
+++ b/lib/iban.ml
@@ -82,7 +82,16 @@ let to_string = Fn.id
82let of_string s = 82let of_string s =
83 match make s with 83 match make s with
84 | Some iban -> iban 84 | Some iban -> iban
85 | None -> Printf.failwithf "Iban.of_string: %S" s () 85 | None -> Printf.failwithf "Iban.of_string: invalid IBAN %S" s ()
86 86
87let sexp_of_t iban = Sexp.Atom iban 87let sexp_of_t iban = Sexp.Atom iban
88
89let t_of_sexp sexp =
90 match sexp with
91 | Sexp.Atom s -> (
92 match make s with
93 | Some iban -> iban
94 | None -> of_sexp_error "Iban.t_of_sexp: invalid IBAN" sexp)
95 | Sexp.List _ -> of_sexp_error "Iban.t_of_sexp: expected a list" sexp
96
88let equal = String.equal 97let equal = String.equal