resolve T13704
ClosedPublic

Authored by chessai on Sep 30 2018, 4:30 PM.

Details

Summary

allow -main-is to change export list for default module header, allowing one to change the entry point to one's program.

Test Plan

./validate

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
chessai created this revision.Sep 30 2018, 4:30 PM
mpickering added a subscriber: mpickering.EditedSep 30 2018, 4:34 PM

Thanks Daniel, can you clarify the difference between this patch and D5162?

mpickering accepted this revision.Sep 30 2018, 4:39 PM

Looks straightforward to me.

This revision is now accepted and ready to land.Sep 30 2018, 4:39 PM

Thanks Daniel, can you clarify the difference between this patch and D5162?

I believe that D5162 only helps the situation with GHCi not having an implicit module Main(main) where, whereas this patch allows -main-is to specify an entry point to the program alternative to the name 'main' in the absence of a module header while compiling with ghc - the previous behaviour was to demand the existence of a function 'main'. If the explanation provided in docs/users_guide/bugs.rst is insuffient, please let me know.

Thanks Daniel, can you clarify the difference between this patch and D5162?

I believe that D5162 only helps the situation with GHCi not having an implicit module Main(main) where, whereas this patch allows -main-is to specify an entry point to the program alternative to the name 'main' in the absence of a module header while compiling with ghc - the previous behaviour was to demand the existence of a function 'main'. If the explanation provided in docs/users_guide/bugs.rst is insuffient, please let me know.

Sounds good to me. This patch is ready to land.

Closed by commit rGHCabfb91fb0ea2: resolve T13704 (authored by chessai, committed by monoidal). · Explain WhyOct 2 2018, 9:23 AM
This revision was automatically updated to reflect the committed changes.

This has likely caused regression in Trac #15702.