[GHC] #8602: Wrong argument order to Haskell pre-processor (-F, -pgmF, -optF)

Additional arguments to the pre-processor can be passed in using the {{{-optF}}} option. These are fed to cmd on the command line after the
#8602: Wrong argument order to Haskell pre-processor (-F, -pgmF, -optF) -----------------------------------+--------------------------------------- Reporter: SimonHengel | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time crash Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | -----------------------------------+--------------------------------------- So far, and that is what is documented three standard input and output arguments. However, {{{GHC 7.7.20131026}}} passes additional arguments (specified with {{{-optF}}}) before the three standard arguments. Steps to reproduce: {{{ $ echo '{-# OPTIONS_GHC -F -pgmF ./foo.sh -optF bar #-}' > Foo.hs $ echo 'echo $*' > foo.sh $ chmod +x foo.sh $ ghci Foo.hs }}} Expected result: {{{Foo.hs Foo.hs /tmp/ghc16665_0/ghc16665_1.hspp bar}}} is printed to stdout Actual result: {{{bar Foo.hs Foo.hs /tmp/ghc16665_0/ghc16665_1.hspp}}} is printed to stdout -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8602 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8602: Wrong argument order to Haskell pre-processor (-F, -pgmF, -optF) ---------------------------------------+----------------------------------- Reporter: SimonHengel | Owner: hellertime Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Changes (by hellertime): * owner: => hellertime -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8602#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8602: Wrong argument order to Haskell pre-processor (-F, -pgmF, -optF) ---------------------------------------+----------------------------------- Reporter: SimonHengel | Owner: hellertime Type: bug | Status: patch Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Changes (by hellertime): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8602#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8602: Wrong argument order to Haskell pre-processor (-F, -pgmF, -optF) ---------------------------------------+----------------------------------- Reporter: SimonHengel | Owner: hellertime Type: bug | Status: patch Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by hellertime): I swapped the arguments to (++) in runPp so that they match the documentation, and added a test to verify the correct operation. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8602#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8602: Wrong argument order to Haskell pre-processor (-F, -pgmF, -optF) ---------------------------------------+----------------------------------- Reporter: SimonHengel | Owner: hellertime Type: bug | Status: patch Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by hellertime): I just re-formatted these patches so that my author information was reflecting the correct e-mail address. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8602#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8602: Wrong argument order to Haskell pre-processor (-F, -pgmF, -optF)
---------------------------------------+-----------------------------------
Reporter: SimonHengel | Owner: hellertime
Type: bug | Status: patch
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time crash | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
---------------------------------------+-----------------------------------
Comment (by Austin Seipp

#8602: Wrong argument order to Haskell pre-processor (-F, -pgmF, -optF)
---------------------------------------+-----------------------------------
Reporter: SimonHengel | Owner: hellertime
Type: bug | Status: patch
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time crash | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
---------------------------------------+-----------------------------------
Comment (by Austin Seipp

#8602: Wrong argument order to Haskell pre-processor (-F, -pgmF, -optF) ---------------------------------------+----------------------------------- Reporter: SimonHengel | Owner: hellertime Type: bug | Status: closed Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Changes (by thoughtpolice): * status: patch => closed * resolution: => fixed Comment: Merged, thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8602#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC