diff options
author | Emilio Jesus Gallego Arias <e+git@x80.org> | 2018-02-14 06:57:40 +0100 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2018-03-09 23:23:40 +0100 |
commit | 4af41a12a0e7e6b17d25a71568641bd03d5e1f94 (patch) | |
tree | 9ffa30a21f0d5b80aaeae66955e652f185929498 /vernac/classes.ml | |
parent | 5f989f48eaaf5e13568fce9849f40bc554ca0166 (diff) |
[located] More work towards using CAst.t
We continue with the work of #402 and #6745 and update most of the
remaining parts of the AST:
- module declarations
- intro patterns
- top-level sentences
Now, parsed documents should be full annotated by `CAst` nodes.
Diffstat (limited to 'vernac/classes.ml')
-rw-r--r-- | vernac/classes.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vernac/classes.ml b/vernac/classes.ml index 192cc8a55..e074e44a4 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) |