[GHC] #10144: Variant of runGhc which accepts prelude for setting up DynFlags

GHC ghc-devs at haskell.org
Mon Mar 9 14:24:30 UTC 2015


#10144: Variant of runGhc which accepts prelude for setting up DynFlags
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  GHC API           |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Without looking at this in detail, it smells to me that the pacakge-
 database stuff should be in `HscEnv` (which embodies the session state)
 rather than in `DynFlags`.   Changing some arguments from `DynFlags` to
 `HscEnv` doesn't sound so bad.

 I wonder if the package stuff should be mutable state, rather than
 returning a new `HscEnv`?  Many other things in `HscEnv` have this
 mutable-state flavour.

 I feel I don't know enough to have an opinion on the "new version of
 `runGhc`".

 Anything that makes the GHC API simpler and more robust is good.#

 Simon

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


More information about the ghc-tickets mailing list