diff options
| author | Matthieu Sozeau | 2014-07-03 16:06:45 +0200 |
|---|---|---|
| committer | Matthieu Sozeau | 2014-07-03 16:06:45 +0200 |
| commit | f222f46e7d231c5afe72e146de92dc8dcadbdcb6 (patch) | |
| tree | 2906793aada2899d1ebca4714371901cca44be59 /toplevel | |
| parent | 964d1b702e5696d2b6767f972310cc324a6a4aa9 (diff) | |
When defining a monomorphic Program, do not allow arbitrary instantiations
of the universe context in the obligations, it gets gradually fixed
globally by each one of them.
Fixes bug found in Misc/Overloading.
Diffstat (limited to 'toplevel')
| -rw-r--r-- | toplevel/obligations.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/toplevel/obligations.ml b/toplevel/obligations.ml index fc1df9f00d..8f637aa325 100644 --- a/toplevel/obligations.ml +++ b/toplevel/obligations.ml @@ -833,6 +833,13 @@ let rec solve_obligation prg num tac = in let obls = Array.copy obls in let _ = obls.(num) <- obl in + let ctx' = + if not (pi2 prg.prg_kind) (* Not polymorphic *) then + (* This context is already declared globally, we cannot + instantiate the rigid variables anymore *) + Evd.abstract_undefined_variables ctx' + else ctx' + in let res = try update_obls {prg with prg_body = prg.prg_body; |
