diff options
| author | Matthieu Sozeau | 2018-11-27 11:20:57 +0100 |
|---|---|---|
| committer | Matthieu Sozeau | 2018-11-27 11:20:57 +0100 |
| commit | f6a2d21b6c2a93cb70fde235fc897fb75ea51384 (patch) | |
| tree | 8913811d7ff06686a0ec837296545cae12007f85 /checker | |
| parent | dddb72b2f45f39f04e91aa9099bcd1064c629504 (diff) | |
| parent | c58ea20fba5a5ce54aaf62182dfd3ee8a368d529 (diff) | |
Merge PR #8850: Private universes for opaque polymorphic constants.
Diffstat (limited to 'checker')
| -rw-r--r-- | checker/mod_checking.ml | 8 | ||||
| -rw-r--r-- | checker/values.ml | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/checker/mod_checking.ml b/checker/mod_checking.ml index 77f4cea0c6..b83fe831bb 100644 --- a/checker/mod_checking.ml +++ b/checker/mod_checking.ml @@ -19,7 +19,13 @@ let check_constant_declaration env kn cb = | Monomorphic_const ctx -> false, push_context_set ~strict:true ctx env | Polymorphic_const auctx -> let ctx = Univ.AUContext.repr auctx in - true, push_context ~strict:false ctx env + let env = push_context ~strict:false ctx env in + true, env + in + let env' = match cb.const_private_poly_univs, (cb.const_body, poly) with + | None, _ -> env' + | Some local, (OpaqueDef _, true) -> push_subgraph local env' + | Some _, _ -> assert false in let ty = cb.const_type in let _ = infer_type env' ty in diff --git a/checker/values.ml b/checker/values.ml index 628089433a..dcb2bca81a 100644 --- a/checker/values.ml +++ b/checker/values.ml @@ -227,6 +227,7 @@ let v_cb = v_tuple "constant_body" v_constr; Any; v_const_univs; + Opt v_context_set; v_bool; v_typing_flags|] |
