Zulip Chat Archive
Stream: metaprogramming / tactics
Topic: Using `BinderView` and `toBinderViews`
William Sørensen (Aug 21 2024 at 08:38):
Hi I am writing some code that uses BinderView
s quite prevalently. Is this good practice? I see that toBinderViews
is private, but it is also extremely useful to work with. Are there any better alternatives? What's done in lean upstream?
Anand Rao Tadipatri (Aug 21 2024 at 11:53):
It depends on the use case, but it may be better to work with Expr
s instead of Syntax
if it's feasible. Some meta-level functions that make it easier to deal with binders include docs#Lean.Meta.forallMetaTelescope and docs#Lean.Meta.withLocalDecl.
William Sørensen (Aug 21 2024 at 13:12):
I think working with syntax here would be so much easier as i am constructing inductive datatypes and then elaborating this. For the project, the code is already pretty far but using toBinderViews
which is quite painful
Last updated: May 02 2025 at 03:31 UTC