Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,249
    • Issues 5,249
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 576
    • Merge requests 576
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #3217
Closed
Open
Issue created May 11, 2009 by Simon Peyton Jones@simonpjDeveloper

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:

  • 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 (closed) 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.

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
Assignee
Assign to
Time tracking