aboutsummaryrefslogtreecommitdiffhomepage
path: root/tactics/tacintern.ml
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2014-11-18 11:02:25 +0100
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2014-11-18 11:07:13 +0100
commitca7171486839dee28732371ccde4a8bfc549368c (patch)
tree0a72ca88a32028d1af869bcae0698e7aff9afe6f /tactics/tacintern.ml
parent2e3ae20fe1ed3d7238286720c302bc892505caae (diff)
Hopefully the last word on having "simpl f" complying with the
semantics described in the reference manual (i.e. if "f" is a qualid, do not add implicit arguments and, a fortiori, do not try to solve these implicit arguments - in particular, changing DbLib which expected this rule not to be followed).
Diffstat (limited to 'tactics/tacintern.ml')
-rw-r--r--tactics/tacintern.ml21
1 files changed, 9 insertions, 12 deletions
diff --git a/tactics/tacintern.ml b/tactics/tacintern.ml
index 0a9182e0b..5e4024148 100644
--- a/tactics/tacintern.ml
+++ b/tactics/tacintern.ml
@@ -346,18 +346,15 @@ let intern_typed_pattern ist p =
let intern_typed_pattern_or_ref_with_occurrences ist (l,p) =
match p with
- | Inl r -> l,
- (try Inl (intern_evaluable ist r)
- with e when Logic.catchable_exception e ->
- (* Compatibility. In practice, this means that the code above
- is useless. Still the idea of having either an evaluable
- ref or a pattern seems interesting, with "head" reduction
- in case of an evaluable ref, and "strong" reduction in the
- subterm matched when a pattern) *)
- let r = match r with
- | AN r -> r
- | _ -> Qualid (loc_of_smart_reference r,qualid_of_path (path_of_global (smart_global r))) in
- Inr (intern_typed_pattern ist (CRef(r,None))))
+ | Inl r ->
+ let loc = loc_of_smart_reference r in
+ let r = match r with
+ | AN r -> r
+ | _ -> Qualid (loc,qualid_of_path (path_of_global (smart_global r))) in
+ (* Ensure that no implicit arguments are added so that a qualid
+ is interpreted as the head of subterm starting with the
+ corresponding reference *)
+ l, Inr (intern_typed_pattern ist (CAppExpl(loc,(None,r,None),[])))
| Inr c -> l, Inr (intern_typed_pattern ist c)
(* This seems fairly hacky, but it's the first way I've found to get proper