
#13282: Introduce fast path through simplifier for static bindings -------------------------------------+------------------------------------- Reporter: bgamari | Owner: bgamari Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari):
Minor amendments: * I think you only intend to allow saturated data constructor applications; though I'm not sure. * Literals should also be considered static.
Yes, I should have been more precise. I believe the right check is `exprIsConLike_maybe` and verifying that all of the value arguments are themselves binders or literals.
What about type applications of polymorphic data constructors to type variables? E.g.
That is an interesting point; I think there is a reasonable argument to be made for considering type lambdas as static as well. This isn't what the patch (which has been a bit trickier than I thought due to unfoldings getting zapped in various unexpected places) currently implements though. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13282#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler