diff options
| author | msozeau | 2011-03-11 17:44:52 +0000 |
|---|---|---|
| committer | msozeau | 2011-03-11 17:44:52 +0000 |
| commit | c70460837f5158325626b9412d8fa0651340b50f (patch) | |
| tree | 623b886c5e05567de8400315a8f0fd35589f6e03 /plugins | |
| parent | 56f7b49e1f46e495a215d65b7d2acaa03fe3b9cf (diff) | |
Keep information on which fields are subclasses in class declarations,
in preparation for adding forward reasoning to typeclass resolution.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13907 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/subtac/subtac_classes.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/subtac/subtac_classes.ml b/plugins/subtac/subtac_classes.ml index 38f13a76e6..419205a198 100644 --- a/plugins/subtac/subtac_classes.ml +++ b/plugins/subtac/subtac_classes.ml @@ -134,8 +134,11 @@ let new_instance ?(global=false) ctx (instid, bk, cl) props ?(generalize=true) p let (loc_mid, c) = List.find (fun (id', _) -> Name (snd (get_id id')) = id) rest in let rest' = List.filter (fun (id', _) -> Name (snd (get_id id')) <> id) rest in let (loc, mid) = get_id loc_mid in - Option.iter (fun x -> Dumpglob.add_glob loc (ConstRef x)) - (List.assoc (Name mid) k.cl_projs); + List.iter + (fun (n, _, x) -> + if n = Name mid then + Option.iter (fun x -> Dumpglob.add_glob loc (ConstRef x)) x) + k.cl_projs; c :: props, rest' with Not_found -> (CHole (Util.dummy_loc, None) :: props), rest |
