Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.5k
    • Issues 5.5k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 637
    • Merge requests 637
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • 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
  • #5461
Closed
Open
Issue created Sep 05, 2011 by Simon Peyton Jones@simonpjDeveloper

Reconfigurable pretty-printing in GHCi

Phil Wadler wants to control the pretty-printer used to display output in GHCi. Something: adding a flag

  -pretty <function-name>

The supplied function will typically have type (C a => a -> String) for some class C. Using Razvan's libary, he could declare

  :set -pretty GenericPretty.pretty

for example.

Since this is GHCi-specific, one could use a new GHCi command instead:

:pretty GenericPretty.pretty

The latter design would presumably look up GenericPretty.pretty in the current context, and bleat if not found. The version with a flag might do that each time the pretty printer was used, which is arguably less efficient and (more important) more confusing. Personally I think I prefer the :pretty command best. (I'm not fussy about the name.)

Trac metadata
Trac field Value
Version 7.2.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC wadler@inf.ed.ac.uk
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