Skip to content

Fix bugs and docu for #13456 (GHCi commands that are not documented)

Roland Senn requested to merge RolandSenn/ghc:T13456 into master

This patch fixes ticket #13456 (closed) including the bugs of this comment

The patch ...

  1. fixes bug-T13456-2 by adding a check to prevent the user to redefine :! with a custom macro definition.
  2. adds a hint to the error message to use :def! if a user tries to redefine an already defined custom macro with :def (without exclamation mark !).
  3. fixes bug-T13456-1 by adding a check to enforce usage of :def! over :def to create a macro name that redefines an existing GHCi command.
  4. adds the same hint as was added above in step 2 to the error message, if a a user tries to redefine a builtin command with :def.
  5. does not change the expansion rules for abbreviated builtin commands. If eg :load is redefined by a custom macro, :l calls this macro too.
  6. contains tests for 1. - 5.
  7. adds two sentences to the Users Guide about the ghci :def command. It documents the use of double colons (::)
  8. fixes the input of test T8113 to use def! (with exclamation mark) to overwrite the builtin command :type
  9. changes the output of test ghci005 to reflect the new hint in 2.

New test case: T13456

Changed test cases: T8113, ghci005

Merge request reports