Skip to content

Make GHCi have separate flags for interactive Haskell expressions

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:

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.

Trac metadata
Trac field Value
Version 6.10.2
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information