add amount.mli

This commit is contained in:
swrup 2025-11-20 22:14:45 +01:00
parent 58bce4efa2
commit 9b760b436f
5 changed files with 48 additions and 17 deletions

21
src/amount.mli Normal file
View file

@ -0,0 +1,21 @@
type sign =
| Sign_plus
| Sign_minus
type t = private {
sign: sign option;
currency: string;
value: Int64.t;
fraction: Int32.t;
}
val make :
sign:sign option ->
currency:string ->
value:Int64.t ->
fraction:Int32.t ->
(t, string) result
val pp : Format.formatter -> t -> unit
val to_string : t -> string
val of_string : string -> (t, string) result