aboutsummaryrefslogtreecommitdiff
path: root/vernac/classes.ml
diff options
context:
space:
mode:
authorMaxime Dénès2018-03-10 10:03:50 +0100
committerMaxime Dénès2018-03-10 10:03:50 +0100
commit93a1c4786c9b17efdda025f754ad97376d61a9ba (patch)
tree9ffa30a21f0d5b80aaeae66955e652f185929498 /vernac/classes.ml
parent5f989f48eaaf5e13568fce9849f40bc554ca0166 (diff)
parent4af41a12a0e7e6b17d25a71568641bd03d5e1f94 (diff)
Merge PR #6831: [located] More work towards using CAst.t
Diffstat (limited to 'vernac/classes.ml')
-rw-r--r--vernac/classes.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/vernac/classes.ml b/vernac/classes.ml
index 192cc8a555..e074e44a4b 100644
--- a/vernac/classes.ml
+++ b/vernac/classes.ml
@@ -229,8 +229,8 @@ let new_instance ?(abstract=false) ?(global=false) ?(refine= !refine_instance)
| Some (Inl props) ->
let get_id =
function
- | Ident id' -> id'
- | Qualid (loc,id') -> (Loc.tag ?loc @@ snd (repr_qualid id'))
+ | Ident (loc, id') -> CAst.(make ?loc @@ id')
+ | Qualid (loc,id') -> CAst.(make ?loc @@ snd (repr_qualid id'))
in
let props, rest =
List.fold_left
@@ -238,7 +238,7 @@ let new_instance ?(abstract=false) ?(global=false) ?(refine= !refine_instance)
if is_local_assum decl then
try
let is_id (id', _) = match RelDecl.get_name decl, get_id id' with
- | Name id, (_, id') -> Id.equal id id'
+ | Name id, {CAst.v=id'} -> Id.equal id id'
| Anonymous, _ -> false
in
let (loc_mid, c) =
@@ -247,7 +247,7 @@ let new_instance ?(abstract=false) ?(global=false) ?(refine= !refine_instance)
let rest' =
List.filter (fun v -> not (is_id v)) rest
in
- let (loc, mid) = get_id loc_mid in
+ let {CAst.loc;v=mid} = get_id loc_mid in
List.iter (fun (n, _, x) ->
if Name.equal n (Name mid) then
Option.iter (fun x -> Dumpglob.add_glob ?loc (ConstRef x)) x)