fmt
This commit is contained in:
parent
724a3d2b68
commit
4930cd3ae3
5 changed files with 38 additions and 7 deletions
22
src/types.ml
22
src/types.ml
|
|
@ -2,14 +2,32 @@
|
|||
module Error_detail = struct
|
||||
(* TODO GANA error codes
|
||||
https://git.gnunet.org/gana.git/tree/gnu-taler-error-codes/registry.rec *)
|
||||
type t = { code: int; hint: string option }
|
||||
type t = {
|
||||
code: int
|
||||
; hint: string option
|
||||
}
|
||||
end
|
||||
|
||||
(* TODO number
|
||||
- number is "float", but we probably want int everywhere instead
|
||||
- numeric values capped at 2^53 -1 inclusive because json
|
||||
- have a type for seconds/microseconds/..? *)
|
||||
module Timestamp = struct
|
||||
(* Seconds since epoch, or the special
|
||||
value "never" to represent an event that will
|
||||
never happen. *)
|
||||
type t = Never | Seconds of float
|
||||
type t =
|
||||
| Seconds of float
|
||||
| Never
|
||||
end
|
||||
|
||||
module Relative_time = struct
|
||||
(* Duration in microseconds or "forever"
|
||||
to represent an infinite duration. Numeric
|
||||
values are capped at 2^53 - 1 inclusive. *)
|
||||
type t =
|
||||
| Microseconds of float
|
||||
| Forever
|
||||
end
|
||||
|
||||
module Amount = struct
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue