To my
>> I tried
>> (file p.txt)
>> Package {name = "foo", import_dirs = [],
>> [..]
>> package_deps = [], extra_ghc_opts = ["-v"],
>> extra_cc_opts = [], extra_ld_opts = []
>> }
>> [..]
>>
>> ghc -c -package foo Main.hs
>>
>> expecting that it would add -v automatically after -c.
>> But it does not.
>> [..]
Simon Marlow writes
> That does indeed look like a bug: we don't pay any attention to the
> extra_ghc_opts at all.
>
> In fact, I'd like to remove that line from the package spec altogether,
> since the package spec isn't supposed to be ghc-specific at all. So
> unless you have a particularly good use for it, could I remove
> extra_ghc_opts?
Why it is ghc-specific?
Call it extra_command_line_opts,
and it will not look ghc-specific.
The lack of extra_command_line_opts is not important,
but I wonder, why make things worse?
One handcraft teacher said
"make it best possible from the start, for it will outcome bad by
itself".
I thought the idea of -package was to collect in one place all
the project-specific settings. For example, for my project docon,
I need
doconOpts = -fglasgow-exts -fallow-this-and-this ...
Now, the user commands ghc -c $doconOpts -package docon Foo.hs
And with extra_command_line_opts, this will be
ghc -c -package docon Foo.hs
The user has only to set the path variable and command make docon
in install the project. The package is created automatically.
Then, the user has only to remember to add -package docon
to the command line. One has not to remember adding $doconOpts,
has not to think about the compilation error reports when one
forgets to type $doconOpts. Neither one has to care for initiation
of $doconOpts, because it was given in Makefile.
Am I missing something?
-----------------
Serge Mechveliani
[EMAIL PROTECTED]
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs