[GHC] #12517: Simplify runghc command line options
GHC
ghc-devs at haskell.org
Wed Aug 24 07:17:52 UTC 2016
#12517: Simplify runghc command line options
-------------------------------------+-------------------------------------
Reporter: harendra | Owner: harendra
Type: bug | Status: new
Priority: normal | Milestone:
Component: None | Version: 8.0.1
Resolution: | Keywords: runghc
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by harendra):
A problem with transparently passing unrecognized flags to ghc is a very
confusing and hard to understand behavior like this:
{{{
runghc -package text-1.2.2.1 hello.hs
text-1.2.2.0:1:74:
Not in scope: ‘main’
Perhaps you meant ‘min’ (imported from Prelude)
}}}
What happened here is that runghc passed `-package` option to ghc but it
did not pass text-1.2.2.0 which is being treated as the program name. This
happens because of different ways to pass `-package` and its argument. So
we will have to use `--ghc-arg=` for the arg like this:
{{{
runghc -package --ghc-arg=text-1.2.2.1 hello.hs
hello
}}}
If we had the same way to pass both the flag and the argument we won't
have this very confusing behavior.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12517#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list