diff options
-rw-r--r-- | tactics/evar_tactics.ml | 5 | ||||
-rw-r--r-- | tactics/extratactics.ml4 | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tactics/evar_tactics.ml b/tactics/evar_tactics.ml index b569ef97f..311eb657b 100644 --- a/tactics/evar_tactics.ml +++ b/tactics/evar_tactics.ml @@ -71,7 +71,8 @@ let let_evar name typ = Proofview.Goal.enter begin fun gl -> let sigma = Proofview.Goal.sigma gl in let env = Proofview.Goal.env gl in - let sigma',evar = Evarutil.new_evar env sigma ~src typ in + let id = Namegen.id_of_name_using_hdchar env typ name in + let sigma',evar = Evarutil.new_evar env sigma ~src ~naming:(Misctypes.IntroFresh id) typ in Tacticals.New.tclTHEN (Proofview.V82.tactic (Refiner.tclEVARS sigma')) - (Tactics.letin_tac None name evar None Locusops.nowhere) + (Tactics.letin_tac None (Names.Name id) evar None Locusops.nowhere) end diff --git a/tactics/extratactics.ml4 b/tactics/extratactics.ml4 index bf7e8b348..67e924fd6 100644 --- a/tactics/extratactics.ml4 +++ b/tactics/extratactics.ml4 @@ -428,6 +428,8 @@ open Evar_tactics (**********************************************************************) (* Evar creation *) +(* TODO: add support for some test similar to g_constr.name_colon so that + expressions like "evar (list A)" do not raise a syntax error *) TACTIC EXTEND evar [ "evar" "(" ident(id) ":" lconstr(typ) ")" ] -> [ let_evar (Name id) typ ] | [ "evar" constr(typ) ] -> [ let_evar Anonymous typ ] |