#3217: Make GHCi have separate flags for interactive Haskell expressions
-------------------------------+--------------------------------------------
Reporter: simonpj | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 6.12 branch
Component: Compiler | Version: 6.10.2
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-------------------------------+--------------------------------------------
It's becoming clear that in GHCi we want to have a separate set of
command-line flags for
* Compiling Haskell expressions typed at the GHCi prompt
* Compiling entire modules, eg via `:load`
Examples of this need are:
* We already have an ad-hoc difference in the way that type-class
defaults are applied:
http://www.haskell.org/ghc/docs/latest/html/users_guide/interactive-
evaluation.html#extended-default-rules
* In #3202 there's a well-argued request to change behaviour of the
monomorphism restriction
So the new feature would consist of:
* The `InteractiveContext` should contain a set of `DynFlags` used for
compiling command-line Haskell expressions (the ''interactive
`DynFlags`'')
* The `:set` command would change both the `DynFlags` maintained by GHCi
for compiling entire modules (the ''batch `DynFlags`''), and the
interactive `DynFlags`.
* A new `:seti` command to change the interactive flags
* Just possibly a `:setb` command to set the batch flags but leave the
interactive ones unchanged.
Arguably it'd be good to have a command to display the current flag
settings (of either `DynFlags`) but that's another blob of work.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3217>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs