diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-01-18 23:12:51 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-01-19 00:07:33 +0100 |
commit | d2ea7f94cb21662857cd50c95ff41943e5911a9b (patch) | |
tree | 7f19f41c5624a85df05d27fcfb85ffb3d6071053 /testsuite | |
parent | cbc03f1ce3ae23d6b9515157db7c43a2456ad9c9 (diff) | |
download | haskell-d2ea7f94cb21662857cd50c95ff41943e5911a9b.tar.gz |
Hide derived OccNames from user
This hides derived OccNames from the Names returned from
runDeclsWithLocation and clarifies the documentation. This is done to
ensure that these names (originating from, e.g., derived Generic
instances and type representation bindings) don't show up in ghci output
when run with `:set +t`. This fixes #11051.
Test Plan: Validate with included tests
Reviewers: austin
Reviewed By: austin
Subscribers: thomie, hvr
Differential Revision: https://phabricator.haskell.org/D1794
GHC Trac Issues: #11051
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/ghci/scripts/T11051a.script | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T11051a.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T11051b.script | 5 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T11051b.stdout | 1 | ||||
-rwxr-xr-x | testsuite/tests/ghci/scripts/all.T | 4 |
5 files changed, 13 insertions, 1 deletions
diff --git a/testsuite/tests/ghci/scripts/T11051a.script b/testsuite/tests/ghci/scripts/T11051a.script new file mode 100644 index 0000000000..96fadeb7d3 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T11051a.script @@ -0,0 +1,3 @@ +-- Ensure that type representation bindings aren't visible to user +:set +t +data Hi diff --git a/testsuite/tests/ghci/scripts/T11051a.stdout b/testsuite/tests/ghci/scripts/T11051a.stdout new file mode 100644 index 0000000000..44fb93cae5 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T11051a.stdout @@ -0,0 +1 @@ +data Hi diff --git a/testsuite/tests/ghci/scripts/T11051b.script b/testsuite/tests/ghci/scripts/T11051b.script new file mode 100644 index 0000000000..dd420745b5 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T11051b.script @@ -0,0 +1,5 @@ +-- ensure that derived Generics types aren't visible to user +:set +t +:set -XDeriveGeneric +import GHC.Generics +data Hello = Hello Int deriving (Eq, Generic) diff --git a/testsuite/tests/ghci/scripts/T11051b.stdout b/testsuite/tests/ghci/scripts/T11051b.stdout new file mode 100644 index 0000000000..7eb3f08217 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T11051b.stdout @@ -0,0 +1 @@ +data Hello = Hello Int diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index c1bda85ebb..7a6225c8f1 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -236,4 +236,6 @@ test('T8316', expect_broken(8316), ghci_script, ['T8316.script']) test('T11252', normal, ghci_script, ['T11252.script']) test('T10576a', expect_broken(10576), ghci_script, ['T10576a.script']) -test('T10576b', expect_broken(10576), ghci_script, ['T10576b.script'])
\ No newline at end of file +test('T10576b', expect_broken(10576), ghci_script, ['T10576b.script']) +test('T11051a', normal, ghci_script, ['T11051a.script']) +test('T11051b', normal, ghci_script, ['T11051b.script']) |