A lens for zooming into nested expr applications #
A "lens" for looking into the subterms of an expression, tracking where we've been, so that
when we "zoom out" after making a change we know exactly which order of congr_funs and
congr_args we need to make things work.
This file defines the expr_lens inductive type, defines basic operations this type, and defines a
useful map-like function expr.app_map on exprs which maps over applications.
This file is for non-tactics.
Tags #
expr, expr_lens, congr, environment, meta, metaprogramming, tactic
- F : expr_lens.dir
- A : expr_lens.dir
Inductive type with two constructors F and A,
that represent the function-part f and arg-part a of an application f a. They specify the
directions in which an expr_lens should zoom into an expr.
This type is used in the development of rewriting tactics such as nth_rewrite and
rewrite_search.
Instances for expr_lens.dir
- expr_lens.dir.has_sizeof_inst
- expr_lens.dir.inhabited
- expr_lens.dir.has_to_string
String representation of dir.
Equations
- expr_lens.dir.A.to_string = "A"
- expr_lens.dir.F.to_string = "F"