niteria at gmail.com
Thu Dec 3 19:04:40 UTC 2015
I've introduced tyVarsOfTypeAcc recently and the main reason was to get
deterministic order (part of #4012) of free variables in places that
require it, like abstracting type variables when floating out expressions.
It does a bit more than tyVarsOfType, but it's algorithmically better (it
avoids set union) and in the end it comes out about equal in terms of
performance on GHC tests.
The reason for eta-expanding is performance, and I wrote a note  about
I've also run some isolated benchmarks  if you're interested.
2015-12-03 18:43 GMT+00:00 Richard Eisenberg <eir at cis.upenn.edu>:
> Hi devs,
> I'm (once again) merging master into my type=kind branch. I see that we
> now have tyVarsOfTypeAcc :: Type -> FV, distinct from tyVarsOfType :: Type
> -> TyVarSet. I trust that this new version is more performant. However, I
> have a question: in the implementation of these functions, the three extra
> FV parameters (fv_cand in_scope acc) are bound and passed each time.
> I've always understood that eta-reducing in function definitions is better
> than expanding. Or is this just a style choice?
> ghc-devs mailing list
> ghc-devs at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs