[GHC] #8602: Wrong argument order to Haskell pre-processor (-F, -pgmF, -optF)
GHC
ghc-devs at haskell.org
Sun Dec 8 03:02:20 UTC 2013
#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
More information about the ghc-tickets
mailing list