diff options
author | Thomas Refis <thomas.refis@gmail.com> | 2020-03-05 14:19:48 +0100 |
---|---|---|
committer | Thomas Refis <thomas.refis@gmail.com> | 2020-03-05 14:20:04 +0100 |
commit | 86b33bc4503c1f8ca4a907ebfb504da1ed895f6e (patch) | |
tree | e0c7b67537059260284b4e7aef84c10c2dbbb9a0 /typing/types.ml | |
parent | 3fe25383ba9992d1818f6fa8a3a99d05a38a1da4 (diff) | |
download | ocaml-86b33bc4503c1f8ca4a907ebfb504da1ed895f6e.tar.gz |
Uid.reinit
Diffstat (limited to 'typing/types.ml')
-rw-r--r-- | typing/types.ml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/typing/types.ml b/typing/types.ml index e6b1dedd85..f03a4bc694 100644 --- a/typing/types.ml +++ b/typing/types.ml @@ -106,9 +106,11 @@ module Uid = struct print fmt t end) - let mk = - let id = ref (-1) in - fun ~current_unit -> + let id = ref (-1) + + let reinit () = id := (-1) + + let mk ~current_unit = incr id; Item { comp_unit = current_unit; id = !id } |