
#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 rwbarton):
Here we will consider a top-level binding to be "static" if its RHS consists of a data constructor applied to zero or more other static bindings.
Minor amendments: - I think you only intend to allow ''saturated'' data constructor applications; though I'm not sure. - Literals should also be considered static. - What about type applications of polymorphic data constructors to type variables? E.g. {{{#!hs a :: [Maybe a] a = [Nothing] }}} desugars to {{{#!hs a :: forall a. [Maybe a] a = \ (@ a1) -> : @ (Maybe a1) (Nothing @ a1) ([] @ (Maybe a1)) }}} and it's static in the sense that it will be represented by static closures; but at the Core level, it involves a type variable `a1`. Do you consider this "static" in your sense? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13282#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler