Merged
Conversation
Collaborator
Author
|
!bench |
|
Benchmark results for a5b7654 against b39710e are in. There are no significant changes. @eric-wieser
Small changes (1✅)
|
eric-wieser
commented
Mar 17, 2026
Comment on lines
+109
to
+115
| for ldecl in ← getLCtx do | ||
| if !ldecl.isImplementationDetail then | ||
| let local_type ← ldecl.toExpr |> inferType >=> whnf | ||
| for map in maps do | ||
| if let Expr.forallE _ dom _ _ := ← inferType map then | ||
| if (←isDefEq local_type dom) then | ||
| finsets := finsets.push (mkApp map ldecl.toExpr) | ||
| if ← isDefEq local_type dom then | ||
| finsets := finsets.push (map.betaRev #[ldecl.toExpr]) |
Collaborator
Author
There was a problem hiding this comment.
This could simplify to
Suggested change
| for ldecl in ← getLCtx do | |
| if !ldecl.isImplementationDetail then | |
| let local_type ← ldecl.toExpr |> inferType >=> whnf | |
| for map in maps do | |
| if let Expr.forallE _ dom _ _ := ← inferType map then | |
| if (←isDefEq local_type dom) then | |
| finsets := finsets.push (mkApp map ldecl.toExpr) | |
| if ← isDefEq local_type dom then | |
| finsets := finsets.push (map.betaRev #[ldecl.toExpr]) | |
| for ldecl in ← getLCtx do | |
| if !ldecl.isImplementationDetail then | |
| for map in maps do | |
| let finset ← try | |
| mkAppM' map #[ldecl.toExpr] | |
| catch _ => | |
| continue | |
| finsets := finsets.push finset.headBeta |
but lets leave that to a follow-up Pr so that it can be benchmarked separately.
chenson2018
approved these changes
Mar 17, 2026
Collaborator
chenson2018
left a comment
There was a problem hiding this comment.
This is a lot easier to follow now, thanks!
m-ow
pushed a commit
to m-ow/cslib
that referenced
this pull request
Mar 17, 2026
This is faster, because it performs almost all the elaboration at compile-type, rather than when the elaborator is run. I also took the liberty of removing the `id` applications that are presumably not intended.
thomaskwaring
pushed a commit
to thomaskwaring/cslib_SKI
that referenced
this pull request
Apr 6, 2026
This is faster, because it performs almost all the elaboration at compile-type, rather than when the elaborator is run. I also took the liberty of removing the `id` applications that are presumably not intended.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is faster, because it performs almost all the elaboration at compile-type, rather than when the elaborator is run.
I also took the liberty of removing the
idapplications that are presumably not intended.