1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
type t = [
`Error of string
| `No_data
| `Too_large of int
| `Unknown_algo of string
| `Unknown_digits of string
| `Unknown_generator of string
| `Unknown_word_size of string
]
let to_string = function
`Error s -> "General error: " ^ s
| `No_data -> "no data"
| `Too_large n -> "Too large: " ^ (string_of_int n)
| `Unknown_algo s -> "Unknown algo: " ^ s
| `Unknown_digits s -> "Unknown digits: " ^ s
| `Unknown_generator s -> "Unknown generator: " ^ s
| `Unknown_word_size s -> "Unknown word size: " ^ s