|
| 1 | +Require Import Strings.String. |
| 2 | +Require Import ZArith. |
| 3 | +Require Import CoqOfOCaml.Basics. |
| 4 | + |
| 5 | +Local Open Scope Z_scope. |
| 6 | + |
| 7 | +(** * Exceptions *) |
| 8 | +Parameter raise : forall {a : Set}, exn -> a. |
| 9 | + |
| 10 | +Parameter raise_notrace : forall {a : Set}, exn -> a. |
| 11 | + |
| 12 | +Parameter invaliv_arg : forall {a : Set}, string -> a. |
| 13 | + |
| 14 | +Parameter failwith : forall {a : Set}, string -> a. |
| 15 | + |
| 16 | +Parameter Exit : exn. |
| 17 | + |
| 18 | +Parameter Match_failure : string * int * int -> exn. |
| 19 | + |
| 20 | +Parameter Assert_failure : string * int * int -> exn. |
| 21 | + |
| 22 | +Parameter Invalid_argument : string -> exn. |
| 23 | + |
| 24 | +Parameter Failure : string -> exn. |
| 25 | + |
| 26 | +Parameter Not_found : exn. |
| 27 | + |
| 28 | +Parameter Out_of_memory : exn. |
| 29 | + |
| 30 | +Parameter Stack_overflow : exn. |
| 31 | + |
| 32 | +Parameter Sys_error : string -> exn. |
| 33 | + |
| 34 | +Parameter End_of_file : exn. |
| 35 | + |
| 36 | +Parameter Division_by_zero : exn. |
| 37 | + |
| 38 | +Parameter Sys_blocked_io : exn. |
| 39 | + |
| 40 | +Parameter Undefined_recursive_module : string * int * int -> exn. |
| 41 | + |
| 42 | +(** * Comparisons *) |
| 43 | +Parameter op_eq : forall {a : Set}, a -> a -> bool. |
| 44 | + |
| 45 | +Parameter op_ltgt : forall {a : Set}, a -> a -> bool. |
| 46 | + |
| 47 | +Parameter op_lt : forall {a : Set}, a -> a -> bool. |
| 48 | + |
| 49 | +Parameter op_gt : forall {a : Set}, a -> a -> bool. |
| 50 | + |
| 51 | +Parameter op_lteq : forall {a : Set}, a -> a -> bool. |
| 52 | + |
| 53 | +Parameter op_gteq : forall {a : Set}, a -> a -> bool. |
| 54 | + |
| 55 | +Parameter compare : forall {a : Set}, a -> a -> int. |
| 56 | + |
| 57 | +Parameter min : forall {a : Set}, a -> a -> a. |
| 58 | + |
| 59 | +Parameter max : forall {a : Set}, a -> a -> a. |
| 60 | + |
| 61 | +Parameter op_eqeq : forall {a : Set}, a -> a -> bool. |
| 62 | + |
| 63 | +Parameter op_exclamationeq : forall {a : Set}, a -> a -> bool. |
| 64 | + |
| 65 | +(** * Boolean operations *) |
| 66 | +Definition not : bool -> bool := negb. |
| 67 | + |
| 68 | +Definition op_andand : bool -> bool -> bool := andb. |
| 69 | + |
| 70 | +Definition op_pipepipe : bool -> bool -> bool := orb. |
| 71 | + |
| 72 | +(** * Debugging *) |
| 73 | +Parameter __LOC__ : string. |
| 74 | + |
| 75 | +Parameter __FILE__ : string. |
| 76 | + |
| 77 | +Parameter __LINE__ : int. |
| 78 | + |
| 79 | +Parameter __MODULE__ : string. |
| 80 | + |
| 81 | +Parameter __POS__ : string * int * int * int. |
| 82 | + |
| 83 | +Parameter __FUNCTION__ : string. |
| 84 | + |
| 85 | +Parameter __LOC_OF__ : forall {a : Set}, a -> string * a. |
| 86 | + |
| 87 | +Parameter __LINE_OF__ : forall {a : Set}, a -> int * a. |
| 88 | + |
| 89 | +Parameter __POS_OF__ : forall {a : Set}, a -> (string * int * int * int) * a. |
| 90 | + |
| 91 | +(** * Composition operators *) |
| 92 | +(* `coq-of-ocaml` should unfold these operators to generate a cleaner output. *) |
| 93 | + |
| 94 | +(** * Integer arithmetic *) |
| 95 | +Parameter op_tildeminus : int -> int. |
| 96 | + |
| 97 | +Parameter op_tildeplus : int -> int. |
| 98 | + |
| 99 | +Definition succ (n : int) : int := |
| 100 | + n + 1. |
| 101 | + |
| 102 | +Definition pred (n : int) : int := |
| 103 | + n - 1. |
| 104 | + |
| 105 | +Definition op_plus : int -> int -> int := Z.add. |
| 106 | + |
| 107 | +Definition op_minus : int -> int -> int := Z.sub. |
| 108 | + |
| 109 | +Definition op_times : int -> int -> int := Z.mul. |
| 110 | + |
| 111 | +Parameter op_div : int -> int -> int. |
| 112 | + |
| 113 | +Definition _mod : int -> int -> int := Z.rem. |
| 114 | + |
| 115 | +Definition abs : int -> int := Z.abs. |
| 116 | + |
| 117 | +Definition max_int : int := 4611686018427387903. |
| 118 | + |
| 119 | +Definition min_int : int := -4611686018427387904. |
| 120 | + |
| 121 | +Parameter land : int -> int -> int. |
| 122 | + |
| 123 | +Parameter lor : int -> int -> int. |
| 124 | + |
| 125 | +Parameter lxor : int -> int -> int. |
| 126 | + |
| 127 | +Parameter lnot : int -> int. |
| 128 | + |
| 129 | +Parameter lsl : int -> int -> int. |
| 130 | + |
| 131 | +Parameter lsr : int -> int -> int. |
| 132 | + |
| 133 | +Parameter asr : int -> int -> int. |
| 134 | + |
| 135 | +(** * Floating-point arithmetic *) |
| 136 | + |
| 137 | + |
| 138 | +(** * String operations *) |
| 139 | +(** * Character operations *) |
| 140 | +(** * Unit operations *) |
| 141 | +(** * String conversion functions *) |
| 142 | +(** * Pair operations *) |
| 143 | +(** * List operations *) |
| 144 | +(** * Input/output *) |
| 145 | +(** * References *) |
| 146 | +(** * Result type *) |
| 147 | +(** * Operations on format strings *) |
| 148 | +(** * Program termination *) |
| 149 | +(** * Standard library modules *) |
0 commit comments