[GHC] #13801: Make -main-is work with {thing} from arbitrary installed packages
GHC
ghc-devs at haskell.org
Thu Jun 8 18:44:51 UTC 2017
#13801: Make -main-is work with {thing} from arbitrary installed packages
-------------------------------------+-------------------------------------
Reporter: SimonHengel | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.2
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: |
-------------------------------------+-------------------------------------
Changes (by bgamari):
* cc: ezyang (added)
Comment:
CCing ezyang due to his interest in package system concerns.
> I haven't looked at any code, but my assumption is that GHC generates a
driver module, similar to the one we have to write by hand if we don't use
-main-is. Can somebody confirm (or negate) this?
I believe this is partially true. However, it's a bit tricky; we don't
actually generate a module. We merely emit a binding which claims to be
from another module when typechecking what the user says should be the
main module. Have a look at `Note [Root-main Id]` for details.
On the whole this sounds fairly easy to do.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13801#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list