[GHC] #10171: runghc has problem when the argument list is too big

GHC ghc-devs at haskell.org
Thu Mar 19 01:52:49 UTC 2015


#10171: runghc has problem when the argument list is too big
-------------------------------------+-------------------------------------
        Reporter:  redneb            |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  low               |               Milestone:
       Component:  Compiler          |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  POSIX             |            Architecture:
 Type of failure:  Runtime crash     |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by redneb):

 Currently, when you run `runhaskell script.hs arg1 arg2`, `ghc` is called
 with the following arguments:
 {{{
 -ignore-dot-ghci -x hs -e ':set prog "script.hs"' -e ':main ["arg1",
 "arg2"]'
 }}}
 Note the the `["arg1", "arg2"]` part is generated by calling `show` on the
 list of original arguments. This is very inefficient. One solution is to
 introduce a new flag for `ghc` that would directly interpret the specified
 file. The new flag must have a short name so that the length of `"ghc"`
 plus the length of the flag name plus 1 (for the null character) is less
 than the length of `"runhaskell"`.

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


More information about the ghc-tickets mailing list