ghci: don't let ctags/etags overwrite source files
authorAustin Seipp <austin@well-typed.com>
Fri, 20 Nov 2015 13:26:42 +0000 (07:26 -0600)
committerAustin Seipp <austin@well-typed.com>
Fri, 20 Nov 2015 13:27:05 +0000 (07:27 -0600)
commita689c8edb1639669cb8df58092b8b77a0a581717
tree6b39f3fc3645e21ef5e40d96a38f76d2d9d033f0
parentb72ca3e3fa54b80a2c376e259cd09df60c7106bf
ghci: don't let ctags/etags overwrite source files

A ource file which was accidently passed as parameter into `:ctags` or `:etags`
can be overwritten by tag data. This patch updates documentation to avoid
confusion in commands usage and prevents `collateAndWriteTags` from modifying
existing source files.

Reviewed By: thomie, bgamari, austin

Differential Revision: https://phabricator.haskell.org/D1471

GHC Trac Issues: #10989
ghc/GhciTags.hs
ghc/InteractiveUI.hs
testsuite/tests/ghci/scripts/T10989.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/T10989.stderr [new file with mode: 0644]
testsuite/tests/ghci/scripts/T10989.stdout [new file with mode: 0644]
testsuite/tests/ghci/scripts/all.T