diff options
Diffstat (limited to '')
-rw-r--r-- | src/Errors.ml | 5 | ||||
-rw-r--r-- | src/Identifiers.ml | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/Errors.ml b/src/Errors.ml new file mode 100644 index 00000000..dcdc9102 --- /dev/null +++ b/src/Errors.ml @@ -0,0 +1,5 @@ +exception IntegerOverflow of unit + +exception Unimplemented of string + +let unimplemented msg = raise (Unimplemented ("unimplemented: " ^ msg)) diff --git a/src/Identifiers.ml b/src/Identifiers.ml index 7d440f4d..07d9c8a5 100644 --- a/src/Identifiers.ml +++ b/src/Identifiers.ml @@ -1,5 +1,3 @@ -exception IntegerOverflow of unit - (** Signature for a module describing an identifier. We often need identifiers (for definitions, variables, etc.) and in @@ -45,7 +43,7 @@ module IdGen () : Id = struct (* Identifiers should never overflow (because max_int is a really big * value - but we really want to make sure we detect overflows if * they happen *) - if x == max_int then raise (IntegerOverflow ()) else x + 1 + if x == max_int then raise (Errors.IntegerOverflow ()) else x + 1 let to_string = string_of_int |