Opened 3 years ago

Closed 22 months ago

#5461 closed feature request (fixed)

Reconfigurable pretty-printing in GHCi

Reported by: simonpj Owned by: bravit
Priority: normal Milestone: 7.6.1
Component: Compiler Version: 7.2.1
Keywords: Cc: wadler@…, bravit111@…, dterei
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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.)

Change History (29)

comment:1 Changed 3 years ago by simonpj

  • Type changed from bug to feature request

comment:2 Changed 3 years ago by guest

I don't understand why a new command behaves differently than a flag. What would cause the flag to look the pretty printer up each time?

For my view, what is important is that it should be easy to customize either by
(a) proving a flag on the command line,
(b) adding a line to the .ghci file, or
(c) including a pragma in one of the loaded modules

For this purpose, it is also important that one can give a global name, rather than need to rely on what is in the current context.

-- Philip Wadler (logged in as guest because the registration function is buggy)

comment:3 Changed 3 years ago by simonmar

I think I would implement this as a flag, mainly because it's simpler: no changes to the GHC API, or the InteractiveContext type, just DynFlags and TcRnDriver.mkPlan.

You could still have a :pretty command in GHCi, and also check for errors early by implementing that in the GHCi front end.

Also, the function should be a replacement for print, i.e. it should have a type of the form C a => a -> IO String. See TcRnDriver.mkPlan for details of how we typecheck interactive statements.

I would probably call it -interactive-print=<name>.

comment:4 Changed 3 years ago by igloo

It could also use :set pretty rather than :pretty.

comment:5 Changed 3 years ago by simonpj

I argue for a command because it only makes sense in GHCi. What would it mean to have

{-# OPTIONS_GHC -interactive-print=foo #-}
module M where ..

{-# OPTIONS_GHC -interactive-print=bar#-}
module N where ...

Now load M and N into GHCi. What print to use? GHC's flags almost all affect one particular module. This doesn't: it affects the REPL, so we should put it in the REPL. Just like :set prompt or :set editor. (Ian's right; :set prettyprint would be the right thing.)

Simon

comment:6 Changed 3 years ago by simonmar

It also makes sense for ghc -e. If it was a flag, other front ends would be able to use it without modification. The GHCi command can be whatever you like, of course.

The flag would be ignored in an OPTIONS_GHC pragma (this will happen automatically).

comment:7 Changed 2 years ago by igloo

  • Milestone set to 7.6.1

comment:8 Changed 23 months ago by bravit

  • Cc bravit111@… added
  • Owner set to bravit

This feature is also helpful for teaching Haskell in countries with non-latin alphabet. It would be much more convenient to use, say cyrillic, literals in GHCi.

comment:9 Changed 23 months ago by dterei

  • Cc dterei added

comment:10 Changed 22 months ago by bravit

  • Status changed from new to patch

Feature request is implemented in this way:

1) User can specify flag -interactive-print=<Module-name.function-name> in command line or set it via :set command in ghci. This function's type should be of a form C a => a -> IO (), though this isn't checked prior to actual call.

2) We search for this function in currently loaded modules and registered packages. Errors, if any, are reported.

3) The function is invoked after evaluating of given expression.

For example, user has this special printing function:

module SpecPrinter where
import System.IO

sprint a = putStrLn $ show a ++ "!"

Running command:

ghc -e "[1,2,3]" -interactive-print=SpecPrinter.sprint SpecPrinter

gives output

[1,2,3]!

In GHCi:

Prelude> [1,2,3]
[1,2,3]
Prelude> :load SpecPrinter
*SpecPrinter> :set -interactive-print=SpecPrinter.sprint
*SpecPrinter> [1,2,3]
[1,2,3]!

comment:11 Changed 22 months ago by pcapriotti

  • Difficulty set to Unknown

Wouldn't it be better to store the function Name in the context instead of having two different fields in DynFlags?

comment:12 Changed 22 months ago by bravit

Do you mean extending HscTypes.InteractiveContext with this field?

comment:13 Changed 22 months ago by pcapriotti

Yes

comment:14 Changed 22 months ago by bravit

I have uploaded another version of the patch, where the function Name is stored in the context.

comment:15 Changed 22 months ago by bravit111@…

commit bec0737c9a96eb19f521a07de615366433ce6a4d

Author: Vitaly Bragilesky <bravit111@gmail.com>
Date:   Thu Jun 21 12:26:29 2012 +0400

    Implemented feature request on reconfigurable pretty-printing in GHCi (#5461)

 compiler/main/DynFlags.hs         |   22 ++++++++++++++++++----
 compiler/typecheck/TcRnDriver.lhs |    4 +++-
 ghc/InteractiveUI.hs              |   15 +++++++++++++++
 3 files changed, 36 insertions(+), 5 deletions(-)

comment:16 Changed 22 months ago by bravit

Original version of the patch was committed. Is it all right?

comment:17 Changed 22 months ago by pcapriotti

No, I accidentally pushed the old version. Fix on the way.

The new patch looks good, thanks.

comment:18 Changed 22 months ago by bravit

Sorry, I've messed up with patch names.

comment:19 Changed 22 months ago by p.capriotti@…

commit 0753cf09d5ef990ca620632409a1db18a75563fa

Author: Paolo Capriotti <p.capriotti@gmail.com>
Date:   Mon Jun 25 13:45:03 2012 +0100

    New version of the patch for #5461.

 compiler/main/DynFlags.hs         |   14 +++-----------
 compiler/main/HscTypes.lhs        |   14 ++++++++++++--
 compiler/typecheck/TcRnDriver.lhs |    3 +--
 compiler/typecheck/TcRnMonad.lhs  |    3 +++
 ghc/InteractiveUI.hs              |    8 +++++---
 5 files changed, 24 insertions(+), 18 deletions(-)

comment:20 Changed 22 months ago by pcapriotti

  • Resolution set to fixed
  • Status changed from patch to closed

comment:21 Changed 22 months ago by simonmar

  • Owner bravit deleted
  • Resolution fixed deleted
  • Status changed from closed to new

We need a User Guide update too.

comment:22 Changed 22 months ago by bravit

  • Owner set to bravit

I will do it asap.

comment:23 Changed 22 months ago by bravit

  • Status changed from new to patch

I've attached patch to the User Guide.

comment:24 Changed 22 months ago by marlowsd@…

commit 99fd2469fba1a38b2a65b4694f337d92e559df01

Merge: d260d91... 0d19922...
Author: Simon Marlow <marlowsd@gmail.com>
Date:   Wed Jul 4 10:34:48 2012 +0100

    Merge remote-tracking branch 'origin/master' into newcg
    
    * origin/master: (756 commits)
      don't crash if argv[0] == NULL (#7037)
      -package P was loading all versions of P in GHCi (#7030)
      Add a Note, copying text from #2437
      improve the --help docs a bit (#7008)
      Copy Data.HashTable's hashString into our Util module
      Build fix
      Build fixes
      Parse error: suggest brackets and indentation.
      Don't build the ghc DLL on Windows; works around trac #5987
      On Windows, detect if DLLs have too many symbols; trac #5987
      Add some more Integer rules; fixes #6111
      Fix PA dfun construction with silent superclass args
      Add silent superclass parameters to the vectoriser
      Add silent superclass parameters (again)
      Mention Generic1 in the user's guide
      Make the GHC API a little more powerful.
      tweak llvm version warning message
      New version of the patch for #5461.
      Fix Word64ToInteger conversion rule.
      Implemented feature request on reconfigurable pretty-printing in GHCi (#5461)
      ...
    
    Conflicts:
    	compiler/basicTypes/UniqSupply.lhs
    	compiler/cmm/CmmBuildInfoTables.hs
    	compiler/cmm/CmmLint.hs
    	compiler/cmm/CmmOpt.hs
    	compiler/cmm/CmmPipeline.hs
    	compiler/cmm/CmmStackLayout.hs
    	compiler/cmm/MkGraph.hs
    	compiler/cmm/OldPprCmm.hs
    	compiler/codeGen/CodeGen.lhs
    	compiler/codeGen/StgCmm.hs
    	compiler/codeGen/StgCmmBind.hs
    	compiler/codeGen/StgCmmLayout.hs
    	compiler/codeGen/StgCmmUtils.hs
    	compiler/main/CodeOutput.lhs
    	compiler/main/HscMain.hs
    	compiler/nativeGen/AsmCodeGen.lhs
    	compiler/simplStg/SimplStg.lhs

 .authorspellings                                   |   29 -
 .darcs-boring                                      |  256 ---
 .gitignore                                         |    1 +
 README                                             |   11 +-
 aclocal.m4                                         |   96 +-
 bindisttest/Makefile                               |    4 +-
 bindisttest/ghc.mk                                 |    4 +-
 compiler/HsVersions.h                              |   13 +-
 compiler/basicTypes/BasicTypes.lhs                 |   44 +-
 compiler/basicTypes/DataCon.lhs                    |   33 +-
 compiler/basicTypes/Demand.lhs                     |    3 -
 compiler/basicTypes/Id.lhs                         |   21 +-
 compiler/basicTypes/IdInfo.lhs                     |   17 +-
 compiler/basicTypes/Literal.lhs                    |   56 +-
 compiler/basicTypes/MkId.lhs                       |   74 +-
 compiler/basicTypes/MkId.lhs-boot                  |    3 +
 compiler/basicTypes/Name.lhs                       |    5 +-
 compiler/basicTypes/NameEnv.lhs                    |   32 +-
 compiler/basicTypes/OccName.lhs                    |   13 +-
 compiler/basicTypes/RdrName.lhs                    |   46 +-
 compiler/basicTypes/SrcLoc.lhs                     |  279 ++--
 compiler/basicTypes/UniqSupply.lhs                 |    9 +-
 compiler/basicTypes/Unique.lhs                     |   37 +-
 compiler/basicTypes/Var.lhs                        |   40 +-
 compiler/cmm/Bitmap.hs                             |    2 +-
 compiler/cmm/CLabel.hs                             |  117 +-
 compiler/cmm/Cmm.hs                                |   10 +-
 compiler/cmm/CmmBuildInfoTables.hs                 |   38 +-
 compiler/cmm/CmmCvt.hs                             |    2 +-
 compiler/cmm/CmmExpr.hs                            |    4 +
 compiler/cmm/CmmInfo.hs                            |    4 +-
 compiler/cmm/CmmLint.hs                            |   71 +-
 compiler/cmm/CmmMachOp.hs                          |    9 +-
 compiler/cmm/CmmOpt.hs                             |   31 +-
 compiler/cmm/CmmParse.y                            |   10 +-
 compiler/cmm/CmmPipeline.hs                        |   22 +-
 compiler/cmm/CmmProcPoint.hs                       |    2 +-
 compiler/cmm/CmmStackLayout.hs                     |  591 +++++
 compiler/cmm/CmmType.hs                            |    6 +
 compiler/cmm/CmmUtils.hs                           |    7 +-
 compiler/cmm/OldCmm.hs                             |    9 +-
 compiler/cmm/OldCmmLint.hs                         |   70 +-
 compiler/cmm/OldCmmUtils.hs                        |    1 +
 compiler/cmm/OldPprCmm.hs                          |   99 +-
 compiler/cmm/OptimizationFuel.hs                   |    1 +
 compiler/cmm/PprC.hs                               |   76 +-
 compiler/cmm/PprCmm.hs                             |  109 +-
 compiler/cmm/PprCmmDecl.hs                         |   97 +-
 compiler/cmm/PprCmmExpr.hs                         |  117 +-
 compiler/codeGen/CgBindery.lhs                     |   27 +-
 compiler/codeGen/CgCase.lhs                        |    1 -
 compiler/codeGen/CgClosure.lhs                     |   29 +-
 compiler/codeGen/CgCon.lhs                         |   11 +-
 compiler/codeGen/CgExpr.lhs                        |    2 +-
 compiler/codeGen/CgForeignCall.hs                  |    8 +-
 compiler/codeGen/CgInfoTbls.hs                     |    5 +-
 compiler/codeGen/CgMonad.lhs                       |    1 +
 compiler/codeGen/CgParallel.hs                     |   69 +-
 compiler/codeGen/CgPrimOp.hs                       |  186 ++-
 compiler/codeGen/CgProf.hs                         |    3 +-
 compiler/codeGen/CgStackery.lhs                    |    3 +-
 compiler/codeGen/CgTailCall.lhs                    |    1 +
 compiler/codeGen/CgTicky.hs                        |   13 +-
 compiler/codeGen/CgUtils.hs                        |   13 +-
 compiler/codeGen/ClosureInfo.lhs                   |   50 +-
 compiler/codeGen/CodeGen.lhs                       |    3 +-
 compiler/codeGen/StgCmm.hs                         |    5 +-
 compiler/codeGen/StgCmmBind.hs                     |   47 +-
 compiler/codeGen/StgCmmClosure.hs                  |   68 +-
 compiler/codeGen/StgCmmCon.hs                      |    4 +-
 compiler/codeGen/StgCmmEnv.hs                      |    1 -
 compiler/codeGen/StgCmmExpr.hs                     |    2 +-
 compiler/codeGen/StgCmmForeign.hs                  |    7 +-
 compiler/codeGen/StgCmmGran.hs                     |   57 +-
 compiler/codeGen/StgCmmHeap.hs                     |   10 +-
 compiler/codeGen/StgCmmLayout.hs                   |   27 +-
 compiler/codeGen/StgCmmMonad.hs                    |   12 +-
 compiler/codeGen/StgCmmPrim.hs                     |   17 +-
 compiler/codeGen/StgCmmProf.hs                     |    3 +-
 compiler/codeGen/StgCmmTicky.hs                    |   19 +-
 compiler/codeGen/StgCmmUtils.hs                    |   14 +-
 compiler/coreSyn/CoreArity.lhs                     |   10 +-
 compiler/coreSyn/CoreFVs.lhs                       |   20 +-
 compiler/coreSyn/CoreLint.lhs                      |  531 ++---
 compiler/coreSyn/CorePrep.lhs                      |  481 ++--
 compiler/coreSyn/CoreSubst.lhs                     |    5 +-
 compiler/coreSyn/CoreSyn.lhs                       |   92 +-
 compiler/coreSyn/CoreTidy.lhs                      |    4 +-
 compiler/coreSyn/CoreUnfold.lhs                    |  165 +-
 compiler/coreSyn/CoreUtils.lhs                     |  275 ++-
 compiler/coreSyn/MkCore.lhs                        |   54 +-
 compiler/coreSyn/MkExternalCore.lhs                |  199 +-
 compiler/coreSyn/PprCore.lhs                       |  261 ++--
 compiler/coreSyn/TrieMap.lhs                       |  137 +-
 compiler/deSugar/Coverage.lhs                      |  510 +++--
 compiler/deSugar/Desugar.lhs                       |    9 +-
 compiler/deSugar/DsArrows.lhs                      |    4 +-
 compiler/deSugar/DsBinds.lhs                       |  208 ++-
 compiler/deSugar/DsCCall.lhs                       |   13 +-
 compiler/deSugar/DsExpr.lhs                        |   63 +-
 compiler/deSugar/DsForeign.lhs                     |  136 +-
 compiler/deSugar/DsListComp.lhs                    |   50 +-
 compiler/deSugar/DsMeta.hs                         | 1005 +++++----
 compiler/deSugar/DsMonad.lhs                       |   19 +-
 compiler/deSugar/DsUtils.lhs                       |    4 +-
 compiler/deSugar/Match.lhs                         |    2 +-
 compiler/deSugar/MatchCon.lhs                      |   17 +-
 compiler/ghc.cabal.in                              |   42 +-
 compiler/ghc.mk                                    |   28 +-
 compiler/ghci/ByteCodeAsm.lhs                      |  599 +++---
 compiler/ghci/ByteCodeGen.lhs                      |  276 ++-
 compiler/ghci/ByteCodeItbls.lhs                    |   31 +-
 compiler/ghci/ByteCodeLink.lhs                     |   14 +-
 compiler/ghci/Debugger.hs                          |   11 +-
 compiler/ghci/DebuggerUtils.hs                     |    4 +-
 compiler/ghci/LibFFI.hsc                           |    4 +-
 compiler/ghci/Linker.lhs                           |  705 +++---
 compiler/ghci/ObjLink.lhs                          |   41 +-
 compiler/ghci/RtClosureInspect.hs                  |  180 +-
 compiler/hsSyn/Convert.lhs                         |  353 ++--
 compiler/hsSyn/HsBinds.lhs                         |   44 +-
 compiler/hsSyn/HsDecls.lhs                         |  419 ++--
 compiler/hsSyn/HsExpr.lhs                          |   46 +-
 compiler/hsSyn/HsImpExp.lhs                        |   19 +-
 compiler/hsSyn/HsPat.lhs                           |   11 +-
 compiler/hsSyn/HsSyn.lhs                           |    3 +-
 compiler/hsSyn/HsTypes.lhs                         |  406 ++--
 compiler/hsSyn/HsUtils.lhs                         |   94 +-
 compiler/iface/BinIface.hs                         |  169 +-
 compiler/iface/BuildTyCl.lhs                       |   15 +-
 compiler/iface/FlagChecker.hs                      |   46 +-
 compiler/iface/IfaceEnv.lhs                        |   25 +-
 compiler/iface/IfaceSyn.lhs                        |   39 +-
 compiler/iface/IfaceType.lhs                       |  154 +-
 compiler/iface/LoadIface.lhs                       |   15 +-
 compiler/iface/MkIface.lhs                         |  254 ++-
 compiler/iface/TcIface.lhs                         |  198 ++-
 compiler/llvmGen/Llvm.hs                           |    1 -
 compiler/llvmGen/Llvm/PpLlvm.hs                    |  106 +-
 compiler/llvmGen/LlvmCodeGen.hs                    |   41 +-
 compiler/llvmGen/LlvmCodeGen/Base.hs               |   16 +-
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs            |   57 +-
 compiler/llvmGen/LlvmCodeGen/Ppr.hs                |   13 +-
 compiler/main/Annotations.hs                       |  107 +
 compiler/main/Annotations.lhs                      |  108 -
 compiler/main/CmdLineParser.hs                     |    4 +-
 compiler/main/CodeOutput.lhs                       |   13 +-
 compiler/main/Constants.lhs                        |    4 +
 compiler/main/DriverMkDepend.hs                    |   10 +-
 compiler/main/DriverPipeline.hs                    |  106 +-
 compiler/main/DynFlags.hs                          |  412 +++-
 compiler/main/DynFlags.hs-boot                     |   13 +
 compiler/main/DynamicLoading.hs                    |   21 +-
 compiler/main/ErrUtils.lhs                         |  119 +-
 compiler/main/ErrUtils.lhs-boot                    |    1 +
 compiler/main/GHC.hs                               |  192 ++-
 compiler/main/GhcMake.hs                           | 1306 ++++++------
 compiler/main/HeaderInfo.hs                        |   78 +-
 compiler/main/HscMain.hs                           |  325 ++--
 compiler/main/HscStats.hs                          |  160 ++
 compiler/main/HscStats.lhs                         |   12 +-
 compiler/main/HscTypes.lhs                         |  105 +-
 compiler/main/InteractiveEval.hs                   |   99 +-
 compiler/main/PackageConfig.hs                     |   50 +-
 compiler/main/Packages.lhs                         |  437 ++--
 compiler/main/StaticFlagParser.hs                  |   38 +-
 compiler/main/StaticFlags.hs                       |   68 +-
 compiler/main/SysTools.lhs                         |   25 +-
 compiler/main/TidyPgm.lhs                          |  749 ++++---
 compiler/nativeGen/AsmCodeGen.lhs                  |  647 +++---
 compiler/nativeGen/PIC.hs                          |   93 +-
 compiler/nativeGen/PPC/CodeGen.hs                  |   33 +-
 compiler/nativeGen/PPC/Ppr.hs                      |  567 +++---
 compiler/nativeGen/PPC/Regs.hs                     |   14 +-
 compiler/nativeGen/PprBase.hs                      |   17 -
 compiler/nativeGen/RegAlloc/Graph/Main.hs          |  609 +++---
 compiler/nativeGen/RegAlloc/Graph/SpillCost.hs     |   10 +-
 compiler/nativeGen/RegAlloc/Graph/Stats.hs         |   30 +-
 compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs |   56 +-
 compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs     |   14 +-
 compiler/nativeGen/RegAlloc/Linear/Main.hs         |   44 +-
 compiler/nativeGen/RegAlloc/Liveness.hs            |   68 +-
 compiler/nativeGen/SPARC/CodeGen.hs                |  511 ++++-
 compiler/nativeGen/SPARC/CodeGen/CCall.hs          |  343 ---
 compiler/nativeGen/SPARC/CodeGen/CondCode.hs       |    7 +-
 compiler/nativeGen/SPARC/CodeGen/Gen64.hs          |    3 +-
 compiler/nativeGen/SPARC/CodeGen/Sanity.hs         |   10 +-
 compiler/nativeGen/SPARC/Imm.hs                    |    5 +-
 compiler/nativeGen/SPARC/Ppr.hs                    |   94 +-
 compiler/nativeGen/TargetReg.hs                    |   70 +-
 compiler/nativeGen/X86/CodeGen.hs                  |  458 +++--
 compiler/nativeGen/X86/Instr.hs                    |    3 +
 compiler/nativeGen/X86/Ppr.hs                      |  155 +-
 compiler/nativeGen/X86/Regs.hs                     |   43 +-
 compiler/parser/Lexer.x                            |   75 +-
 compiler/parser/Parser.y.pp                        |  143 +-
 compiler/parser/ParserCore.y                       |   34 +-
 compiler/parser/RdrHsSyn.lhs                       |  330 ++--
 compiler/prelude/ForeignCall.lhs                   |   56 +-
 compiler/prelude/PrelNames.lhs                     |  136 +-
 compiler/prelude/PrelRules.lhs                     |  212 ++-
 compiler/prelude/PrimOp.lhs                        |    3 -
 compiler/prelude/PrimOp.lhs-boot                   |    7 +
 compiler/prelude/TysPrim.lhs                       |  114 +-
 compiler/prelude/TysWiredIn.lhs                    |   88 +-
 compiler/prelude/primops.txt.pp                    |   39 +
 compiler/profiling/CostCentre.lhs                  |    6 +-
 compiler/profiling/ProfInit.hs                     |    9 +-
 compiler/profiling/SCCfinal.lhs                    |    1 +
 compiler/rename/RnBinds.lhs                        |   80 +-
 compiler/rename/RnEnv.lhs                          |  470 +++--
 compiler/rename/RnExpr.lhs                         |   80 +-
 compiler/rename/RnHsSyn.lhs                        |  159 --
 compiler/rename/RnNames.lhs                        |  194 +--
 compiler/rename/RnPat.lhs                          |   41 +-
 compiler/rename/RnSource.lhs                       |  563 +++---
 compiler/rename/RnTypes.lhs                        |  652 ++++--
 compiler/simplCore/CSE.lhs                         |   30 +-
 compiler/simplCore/CoreMonad.lhs                   |   61 +-
 compiler/simplCore/FloatIn.lhs                     |   18 +-
 compiler/simplCore/OccurAnal.lhs                   |  116 +-
 compiler/simplCore/SetLevels.lhs                   |   41 +-
 compiler/simplCore/SimplCore.lhs                   |   92 +-
 compiler/simplCore/SimplEnv.lhs                    |    1 +
 compiler/simplCore/SimplMonad.lhs                  |    3 +-
 compiler/simplCore/SimplUtils.lhs                  |  234 +--
 compiler/simplCore/Simplify.lhs                    |  131 +-
 compiler/simplStg/SRT.lhs                          |    4 +-
 compiler/simplStg/SimplStg.lhs                     |   14 +-
 compiler/simplStg/UnariseStg.lhs                   |  167 ++
 compiler/specialise/Rules.lhs                      |  584 +++---
 compiler/specialise/SpecConstr.lhs                 |   13 +-
 compiler/specialise/Specialise.lhs                 | 1070 +++++-----
 compiler/stgSyn/CoreToStg.lhs                      |   41 +-
 compiler/stgSyn/StgLint.lhs                        |   71 +-
 compiler/stgSyn/StgSyn.lhs                         |   48 +-
 compiler/stranal/DmdAnal.lhs                       |   17 +-
 compiler/stranal/WorkWrap.lhs                      |   88 +-
 compiler/stranal/WwLib.lhs                         |   56 +-
 compiler/typecheck/FamInst.lhs                     |   78 +-
 compiler/typecheck/Inst.lhs                        |  104 +-
 compiler/typecheck/TcArrows.lhs                    |    4 +-
 compiler/typecheck/TcBinds.lhs                     |  485 ++---
 compiler/typecheck/TcCanonical.lhs                 | 1384 ++++++-------
 compiler/typecheck/TcClassDcl.lhs                  |  124 +-
 compiler/typecheck/TcDeriv.lhs                     |  292 ++-
 compiler/typecheck/TcEnv.lhs                       |  194 +-
 compiler/typecheck/TcErrors.lhs                    |  388 ++--
 compiler/typecheck/TcEvidence.lhs                  |  159 ++-
 compiler/typecheck/TcExpr.lhs                      |   88 +-
 compiler/typecheck/TcForeign.lhs                   |  104 +-
 compiler/typecheck/TcGenDeriv.lhs                  |   12 +-
 compiler/typecheck/TcGenGenerics.lhs               |  515 ++++-
 compiler/typecheck/TcHsSyn.lhs                     |  184 +-
 compiler/typecheck/TcHsType.lhs                    | 1528 +++++++------
 compiler/typecheck/TcInstDcls.lhs                  |  433 +++--
 compiler/typecheck/TcInteract.lhs                  | 1171 +++++-----
 compiler/typecheck/TcMType.lhs                     |  828 ++++----
 compiler/typecheck/TcMatches.lhs                   |   70 +-
 compiler/typecheck/TcPat.lhs                       |   77 +-
 compiler/typecheck/TcRnDriver.lhs                  |  231 ++-
 compiler/typecheck/TcRnMonad.lhs                   |   80 +-
 compiler/typecheck/TcRnTypes.lhs                   |  326 ++--
 compiler/typecheck/TcRules.lhs                     |  197 ++-
 compiler/typecheck/TcSMonad.lhs                    | 1493 ++++++++------
 compiler/typecheck/TcSimplify.lhs                  | 1115 ++++++----
 compiler/typecheck/TcSplice.lhs                    |  157 +-
 compiler/typecheck/TcSplice.lhs-boot               |    7 +-
 compiler/typecheck/TcTyClsDecls.lhs                |  848 ++++----
 compiler/typecheck/TcTyDecls.lhs                   |   18 +-
 compiler/typecheck/TcType.lhs                      |  131 +-
 compiler/typecheck/TcUnify.lhs                     |  237 +--
 compiler/types/Class.lhs                           |    3 -
 compiler/types/Coercion.lhs                        |   22 +-
 compiler/types/FamInstEnv.lhs                      |   12 +-
 compiler/types/FunDeps.lhs                         |   91 +-
 compiler/types/IParam.lhs                          |   41 -
 compiler/types/IParam.lhs-boot                     |   10 -
 compiler/types/InstEnv.lhs                         |   71 +-
 compiler/types/Kind.lhs                            |  240 +--
 compiler/types/OptCoercion.lhs                     |    1 +
 compiler/types/TyCon.lhs                           |  871 ++++----
 compiler/types/Type.lhs                            |  303 ++--
 compiler/types/TypeRep.lhs                         |  172 +-
 compiler/types/Unify.lhs                           |   59 +-
 compiler/utils/Binary.hs                           |    3 -
 compiler/utils/Digraph.lhs                         |   17 +-
 compiler/utils/Exception.hs                        |    6 +-
 compiler/utils/FastString.lhs                      |    5 -
 compiler/utils/GraphColor.hs                       |  597 +++---
 compiler/utils/GraphOps.hs                         |  923 ++++----
 compiler/utils/ListSetOps.lhs                      |   79 +-
 compiler/utils/MonadUtils.hs                       |   18 -
 compiler/utils/Outputable.lhs                      |  268 +--
 compiler/utils/Outputable.lhs-boot                 |    7 +
 compiler/utils/Panic.lhs                           |  197 ++-
 compiler/utils/Platform.hs                         |   14 +-
 compiler/utils/Pretty.lhs                          |    9 +-
 compiler/utils/UniqFM.lhs                          |    4 +-
 compiler/utils/Util.lhs                            |  211 +-
 compiler/vectorise/Vectorise.hs                    |   21 +-
 compiler/vectorise/Vectorise/Builtins/Base.hs      |    2 +-
 .../vectorise/Vectorise/Builtins/Initialise.hs     |    2 +-
 compiler/vectorise/Vectorise/Convert.hs            |    9 +-
 compiler/vectorise/Vectorise/Env.hs                |    9 +-
 compiler/vectorise/Vectorise/Exp.hs                |  716 +++++--
 .../vectorise/Vectorise/Generic/Description.hs     |    3 +-
 compiler/vectorise/Vectorise/Generic/PADict.hs     |   41 +-
 compiler/vectorise/Vectorise/Generic/PAMethods.hs  |   27 +-
 compiler/vectorise/Vectorise/Generic/PData.hs      |    4 +-
 compiler/vectorise/Vectorise/Monad.hs              |   20 +-
 compiler/vectorise/Vectorise/Monad/Base.hs         |   41 +-
 compiler/vectorise/Vectorise/Monad/Global.hs       |    9 +-
 compiler/vectorise/Vectorise/Monad/InstEnv.hs      |   18 +-
 compiler/vectorise/Vectorise/Type/Classify.hs      |    1 +
 compiler/vectorise/Vectorise/Type/TyConDecl.hs     |   29 +-
 compiler/vectorise/Vectorise/Type/Type.hs          |    1 +
 compiler/vectorise/Vectorise/Utils/Base.hs         |   19 +-
 compiler/vectorise/Vectorise/Utils/PADict.hs       |   74 +-
 config.guess                                       |  482 ++---
 configure.ac                                       |  156 +-
 distrib/compare/compare.hs                         |   23 +-
 docs/coding-style.html                             |   60 +-
 docs/comm/genesis/modules.html                     |    2 +-
 docs/comm/rts-libs/threaded-rts.html               |    2 +-
 docs/ext-core/Makefile                             |    3 -
 docs/ext-core/a4wide.sty                           |   39 -
 docs/ext-core/code.sty                             |   83 -
 docs/ext-core/core.bib                             |  124 -
 docs/ext-core/core.tex                             |  779 -------
 docs/ext-core/ghc.mk                               |   15 -
 docs/index.html.in                                 |   22 +-
 docs/users_guide/bugs.xml                          |   26 +-
 docs/users_guide/external_core.xml                 | 1807 +++++++++++++++
 docs/users_guide/ffi-chap.xml                      |   52 +
 docs/users_guide/flags.xml                         |  103 +-
 docs/users_guide/ghci.xml                          |  119 +-
 docs/users_guide/glasgow_exts.xml                  |  694 ++++--
 docs/users_guide/packages.xml                      |  108 +-
 docs/users_guide/phases.xml                        |   25 +-
 docs/users_guide/runghc.xml                        |    2 +-
 docs/users_guide/runtime_control.xml               |   43 +-
 docs/users_guide/ug-book.xml.in                    |    1 +
 docs/users_guide/ug-ent.xml.in                     |    2 +
 docs/users_guide/using.xml                         | 2354 +++++++++++---------
 docs/vh/vh.xml                                     |  593 +++---
 driver/ghci/ghc.mk                                 |    4 +-
 driver/utils/cwrapper.c                            |    6 +-
 ghc.mk                                             |   39 +-
 ghc/GhciMonad.hs                                   |   48 +-
 ghc/GhciTags.hs                                    |   42 +-
 ghc/InteractiveUI.hs                               |  616 ++++--
 ghc/Main.hs                                        |   19 +-
 ghc/ghc-bin.cabal.in                               |    4 +-
 ghc/ghc.mk                                         |   11 +-
 ghc/hschooks.c                                     |    5 +-
 includes/Cmm.h                                     |    8 +-
 includes/HaskellConstants.hs                       |   12 +-
 includes/MachDeps.h                                |   27 +-
 includes/Rts.h                                     |   26 +-
 includes/RtsAPI.h                                  |    2 +-
 includes/Stg.h                                     |   10 +-
 includes/ghc.mk                                    |   31 +-
 includes/mkDerivedConstants.c                      |   23 +-
 includes/rts/Constants.h                           |   50 +-
 includes/rts/EventLogFormat.h                      |   27 +-
 includes/rts/FileLock.h                            |    6 +-
 includes/rts/Flags.h                               |   12 +-
 includes/rts/Hooks.h                               |    6 +-
 includes/rts/Messages.h                            |   15 +-
 includes/rts/Threads.h                             |    4 +
 includes/rts/Types.h                               |    6 +-
 includes/rts/storage/GC.h                          |    5 +-
 includes/rts/storage/InfoTables.h                  |   22 +-
 includes/rts/storage/TSO.h                         |    2 +-
 includes/stg/DLL.h                                 |   25 +-
 includes/stg/MachRegs.h                            |  209 +-
 includes/stg/MiscClosures.h                        |    2 +
 includes/stg/Types.h                               |   29 +-
 libffi/ghc.mk                                      |   11 +-
 .../Distribution/InstalledPackageInfo/Binary.hs    |    4 +-
 libraries/gen_contents_index                       |   37 +-
 mk/config.mk.in                                    |   21 +-
 mk/tree.mk                                         |    2 +-
 mk/validate-settings.mk                            |   18 +-
 packages                                           |    3 +-
 rts/Adjustor.c                                     |  477 +++--
 rts/Capability.c                                   |   50 +-
 rts/Capability.h                                   |    6 +-
 rts/ClosureFlags.c                                 |   18 +-
 rts/Disassembler.c                                 |   18 +-
 rts/FileLock.c                                     |  144 ++
 rts/FileLock.h                                     |   15 +
 rts/GetTime.h                                      |    3 +
 rts/HeapStackCheck.cmm                             |   12 +-
 rts/Interpreter.c                                  |   48 +-
 rts/Linker.c                                       |  826 +++++++-
 rts/LinkerInternals.h                              |    6 +-
 rts/PosixSource.h                                  |    4 +
 rts/Prelude.h                                      |    8 +-
 rts/PrimOps.cmm                                    |   39 +-
 rts/Printer.c                                      |   26 +-
 rts/ProfHeap.c                                     |    2 +-
 rts/RaiseAsync.c                                   |   77 +-
 rts/RetainerProfile.c                              |    4 +-
 rts/RtsDllMain.c                                   |    4 +-
 rts/RtsDllMain.h                                   |    2 +-
 rts/RtsFlags.c                                     |   20 +-
 rts/RtsMain.c                                      |    7 +-
 rts/RtsProbes.d                                    |   37 +-
 rts/RtsStartup.c                                   |   20 +-
 rts/Schedule.c                                     |   38 +-
 rts/Stats.c                                        |  163 +-
 rts/Stats.h                                        |   19 +-
 rts/StgCRun.c                                      |   87 +-
 rts/StgMiscClosures.cmm                            |    6 +-
 rts/StgStartup.cmm                                 |   12 +-
 rts/Task.c                                         |  104 +-
 rts/Task.h                                         |   30 +-
 rts/Threads.c                                      |   54 +-
 rts/Ticky.c                                        |   26 +-
 rts/Trace.c                                        |  148 ++-
 rts/Trace.h                                        |  263 ++-
 rts/eventlog/EventLog.c                            |  201 ++-
 rts/eventlog/EventLog.h                            |   34 +
 rts/ghc.mk                                         |   23 +-
 rts/hooks/MallocFail.c                             |    2 +-
 rts/hooks/OutOfHeap.c                              |    2 +-
 rts/hooks/StackOverflow.c                          |    2 +-
 rts/package.conf.in                                |    8 +-
 rts/posix/Clock.h                                  |   35 +
 rts/posix/FileLock.c                               |  145 --
 rts/posix/FileLock.h                               |   15 -
 rts/posix/GetTime.c                                |   50 +-
 rts/posix/Itimer.c                                 |   13 +-
 rts/posix/OSMem.c                                  |    2 +-
 rts/posix/OSThreads.c                              |    1 -
 rts/posix/Select.c                                 |   81 +-
 rts/posix/Select.h                                 |    2 +-
 rts/sm/Compact.c                                   |    2 +-
 rts/sm/Evac.c                                      |    2 +-
 rts/sm/GC.c                                        |   25 +-
 rts/sm/Sanity.c                                    |   18 +-
 rts/sm/Scav.c                                      |    6 +-
 rts/sm/Storage.c                                   |  178 +-
 rts/sm/Storage.h                                   |    3 +-
 rts/win32/AwaitEvent.c                             |    4 +-
 rts/win32/GetTime.c                                |   74 +-
 rts/win32/IOManager.c                              |    2 +-
 rts/win32/OSMem.c                                  |   20 +-
 rts/win32/ThrIOManager.c                           |    6 +-
 rts/win32/libHSbase.def                            |    1 -
 rts/win32/libHSghc-prim.def                        |    1 +
 rts/win32/seh_excn.c                               |    5 +-
 rules/build-package-data.mk                        |    8 +-
 rules/build-package-way.mk                         |   15 +-
 rules/build-package.mk                             |    2 +-
 rules/build-prog.mk                                |    4 +-
 rules/c-suffix-rules.mk                            |   22 +-
 rules/cmm-suffix-rules.mk                          |   12 +-
 rules/distdir-way-opts.mk                          |   46 +-
 rules/hs-suffix-rules-srcdir.mk                    |   30 +-
 rules/hs-suffix-rules.mk                           |    8 +-
 rules/package-config.mk                            |   15 +-
 rules/pretty_commands.mk                           |   13 +
 sync-all                                           |   63 +
 utils/compare_sizes/Main.hs                        |    1 -
 utils/fingerprint/fingerprint.py                   |    2 +-
 utils/genapply/GenApply.hs                         |  650 +++---
 utils/genprimopcode/Main.hs                        |  433 ++--
 utils/genprimopcode/Parser.y                       |    1 -
 utils/genprimopcode/ParserM.hs                     |    1 -
 utils/genprimopcode/Syntax.hs                      |   20 +-
 utils/ghc-cabal/Main.hs                            |   44 +-
 utils/ghc-cabal/ghc.mk                             |    4 +-
 utils/ghc-pkg/Main.hs                              |  108 +-
 utils/ghc-pkg/ghc-pkg.wrapper                      |    2 +-
 utils/ghc-pkg/ghc.mk                               |    8 +-
 utils/ghctags/Main.hs                              |   16 +-
 utils/hp2ps/Key.c                                  |   23 +-
 utils/runghc/ghc.mk                                |    3 +
 utils/runghc/runghc.hs                             |   12 +-
 validate                                           |   27 +-
 483 files changed, 33989 insertions(+), 25880 deletions(-)

comment:25 Changed 22 months ago by p.capriotti@…

commit 01386d383fa535a16ccf6117adaffdd38af703ca

Author: Paolo Capriotti <p.capriotti@gmail.com>
Date:   Thu Jul 5 19:46:52 2012 +0100

    Add documentation for -interactive-print (#5461)
    
    Based on a patch by Vitaly Bragilevsky <bravit111@gmail.com>

 docs/users_guide/flags.xml |    7 +++++
 docs/users_guide/ghci.xml  |   55 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+), 0 deletions(-)

comment:26 Changed 22 months ago by pcapriotti

  • Resolution set to fixed
  • Status changed from patch to closed

Pushed documentation patch, with a few changes.

Note: See TracTickets for help on using tickets.