Make GHCi have separate flags for interactive Haskell expressions
|Reported by:||simonpj||Owned by:|
|Keywords:||Cc:||YitzGale, dterei, mle+hs@…|
|Type of failure:||None/Unknown||Difficulty:||Unknown|
|Test Case:||Blocked By:|
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.
Change History (30)
comment:17 Changed 4 years ago by igloo
- Milestone changed from 6.12.3 to 6.14.1
- Priority changed from normal to low
comment:29 Changed 2 years ago by simonpj
- Milestone changed from 7.4.2 to 7.6.1
- Priority changed from high to normal