Draft: Slightly more efficient exprFreeVars/Ids
This patch rewrites the non-deterministic exprFreeVar/Id
functions using Endo
, similar to the implementation in GHC.Core.TyCo.FVs
for types.
The ExprFolder
data type is not exported. It is currently quite ad-hoc and doesn't see any use besides extracting free variables from expressions.
This patch gives a moderate performance boost with -0.1% geo.mean for ghc/alloc
.