Is the name static? You could try open_constr:(?[name] : type)
If not you can construct an identity function in Ltac2 with the right name (and type) and use open_constr:(my_lambda _)
you can avoid producing a cast in the term by using open_constr:(_ :> type)
, then no need to reduce it away
Gaëtan Gilbert said:
you can avoid producing a cast in the term by using
open_constr:(_ :> type)
, then no need to reduce it away
Thanks for the trick !
Janno said:
If not you can construct an identity function in Ltac2 with the right name (and type) and use
open_constr:(my_lambda _)
In my case the name is not static. I must admit the way the name of the evar is chosen is a bit obscur ; I (wrongly) assumed it depended only on the type of the evar. Anyways your solution works, thanks !
Mathis Bouverot-Dupuis has marked this topic as resolved.
Last updated: Oct 12 2024 at 12:01 UTC