[GHC] #8602: Wrong argument order to Haskell pre-processor (-F, -pgmF, -optF)
#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
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 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 <austin@…>): In [changeset:"032969f7c7493d774958e65e61690bd2a995fbbc/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="032969f7c7493d774958e65e61690bd2a995fbbc" Re-order preprocessor args to agree with User Guide (fixes #8602) The section of the User Guide in reference is 4.12.4 Signed-off-by: Austin Seipp <austin@well-typed.com> }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8602#comment:5> 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 <austin@…>): In [changeset:"b7bc064e3cdd439eb54bc6f978a067aa2eef7927/testsuite"]: {{{ #!CommitTicketReference repository="testsuite" revision="b7bc064e3cdd439eb54bc6f978a067aa2eef7927" Add test suite for #8602 Signed-off-by: Austin Seipp <austin@well-typed.com> }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8602#comment:6> 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: 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