[GHC] #2710: -main-is flag in {-# OPTIONS #-} pragma not fully supported
GHC
ghc-devs at haskell.org
Thu Apr 2 19:09:59 UTC 2015
#2710: -main-is flag in {-# OPTIONS #-} pragma not fully supported
-------------------------------------+-------------------------------------
Reporter: Stephan202 | Owner:
Type: bug | Status: infoneeded
Priority: lowest | Milestone: 7.12.1
Component: Compiler | Version: 6.8.3
Resolution: | Keywords: -main-is
Operating System: Unknown/Multiple | ghc
Type of failure: Incorrect | Architecture:
warning at compile-time | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: #1312 | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by thomie):
* status: new => infoneeded
* related: => #1312
Comment:
Please read the following irc discussion.
{{{
thomie > Should `-main-is` be a dynamic flag?
That is, should the following be allowed:
{-# OPTIONS_GHC -main-is Foo.bar -#}
thomie > It's currently broken #2710
thomie > But what should happen when it is specified in multiple
modules?
rwbarton > yeah, or if a module specifies that Main is another module
rwbarton > it's really a link-time setting isn't it?
rwbarton > Probably the only thing that makes sense
to put in an OPTIONS pragma is for a module
to redefine which of its own symbols is main,
but I'm not sure even that is worth supporting
rwbarton > for that matter, what does it mean to mean
to specify in an OPTIONS pragma something like
-rtsopts/-with-rtopts/-debug/etc.
rwbarton > IMO anything like that that doesn't affect the
compilation of an individual module should just
be forbidden
carter_cloud > sounds reasonable to me
}}}
If there are no objections, I'd like to close this ticket as wontfix, and
open a new ticket to show a warning when -main-is/-rtsopts/-with-
rtopts/-debug etc. are used in an OPTIONS pragma.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/2710#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list