[GHC] #9374: Investigate Static Argument Transformation

GHC ghc-devs at haskell.org
Thu Sep 11 08:22:04 UTC 2014


#9374: Investigate Static Argument Transformation
-------------------------------------+-------------------------------------
              Reporter:  jstolarek   |            Owner:
                  Type:  task        |           Status:  new
              Priority:  lowest      |        Milestone:
             Component:  Compiler    |          Version:  7.9
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 As I mentioned elsewhere, one situation where SAT seems always good is
 when the static arg is actually available in an outer scope or even
 statically known. I have seen things that look approximately like this
 after simplification:

 {{{#!hs
 fixedError = error "Bad things!"

 wfoo x y z = case blah of
    p1 -> e1
    p2 -> wfoo e2 e3 z
    _  -> z

 foo x y = wfoo x y fixedError
 }}}

 It would seem in this case that instead of having a static argument in
 place of a closure variable, there's a static argument that just doesn't
 need to be there at all.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9374#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list