diff options
| author | Pierre-Marie Pédrot | 2020-07-10 18:41:30 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-07-10 18:45:46 +0200 |
| commit | 763c71ec355b85ecfb8df3de07cce730f8947cb7 (patch) | |
| tree | 18f441e61ae293b44dccb5edb0dea6e53bc744b0 /lib/system.ml | |
| parent | 511d2caaffb8d412d1645f0a83c9b0a2bbc41411 (diff) | |
Fix #12513: coq no longer reports mismatched version numbers.
Diffstat (limited to 'lib/system.ml')
| -rw-r--r-- | lib/system.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/system.ml b/lib/system.ml index e25f758865..1aadaf6d3a 100644 --- a/lib/system.ml +++ b/lib/system.ml @@ -239,9 +239,12 @@ let intern_state magic filename = let with_magic_number_check f a = try f a with - | Bad_magic_number {filename=fname; _} -> + | Bad_magic_number {filename=fname; actual; expected} -> CErrors.user_err ~hdr:"with_magic_number_check" - (str"File " ++ str fname ++ strbrk" is corrupted.") + (str"File " ++ str fname ++ strbrk" has bad magic number " ++ + (str @@ Int32.to_string actual) ++ str" (expected " ++ (str @@ Int32.to_string expected) ++ str")." ++ + spc () ++ + strbrk "It is corrupted or was compiled with another version of Coq.") | Bad_version_number {filename=fname;actual=actual;expected=expected} -> CErrors.user_err ~hdr:"with_magic_number_check" (str"File " ++ str fname ++ strbrk" has bad version number " ++ |
