[GHC] #13704: -main-is flag should change exports in default module header

GHC ghc-devs at haskell.org
Tue May 16 14:03:21 UTC 2017


#13704: -main-is flag should change exports in default module header
-------------------------------------+-------------------------------------
        Reporter:  cdsmith           |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
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 nomeata):

 Just giving a bit more context: The report specifies in
 https://www.haskell.org/onlinereport/haskell2010/haskellch5.html#x11-990005.1
 that

 >  An abbreviated form of module, consisting only of the module body, is
 permitted. If this is used, the header is assumed to be `module Main(main)
 where`.


 One could argue that the `-main-is`’s intention is to change *all* aspects
 of `Main.main`, i.e. not only the entry point, but also the default module
 header.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13704#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list