summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorZejun Wu <watashi@watashi.ws>2015-07-03 19:31:25 +0200
committerBen Gamari <ben@smart-cactus.org>2015-07-03 22:33:19 +0200
commit1d6ead7d71ae9ad104f9bed9579462ce4a218594 (patch)
tree5a345c53f9e4156261325ca4989a612da95b6635 /testsuite
parentb5e1944e2b069a7df3444e57bae0b4ee15bde73c (diff)
downloadhaskell-1d6ead7d71ae9ad104f9bed9579462ce4a218594.tar.gz
Enable using qualified field of constructor in GHCi
The -fimplicit-import-qualified made it possible to uses qualifed names in GHCi without explicitly import the modules. But it didn't work for field of constructor, this patch fixed this issue. Test Plan: cd testsuite/tests/rename/ && make cd testsuite/tests/ghci/ && make Reviewers: austin, simonpj Reviewed By: austin, simonpj Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D900 GHC Trac Issues: #10439
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/ghci/scripts/T10439.script6
-rw-r--r--testsuite/tests/ghci/scripts/T10439.stdout3
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T1
3 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T10439.script b/testsuite/tests/ghci/scripts/T10439.script
new file mode 100644
index 0000000000..7f481abadd
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T10439.script
@@ -0,0 +1,6 @@
+let tree = Data.Tree.Node 0 []
+Data.Tree.rootLabel tree
+let f (Data.Tree.Node i j) k = Data.Tree.Node k j
+f tree 1
+let g i j = i { Data.Tree.rootLabel = j }
+g tree 2
diff --git a/testsuite/tests/ghci/scripts/T10439.stdout b/testsuite/tests/ghci/scripts/T10439.stdout
new file mode 100644
index 0000000000..63a6be7820
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T10439.stdout
@@ -0,0 +1,3 @@
+0
+Node {rootLabel = 1, subForest = []}
+Node {rootLabel = 2, subForest = []}
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 384868e0d8..aecadc4fe6 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -219,6 +219,7 @@ test('T10408B', normal, run_command,
test('T10248', normal, ghci_script, ['T10248.script'])
test('T10110', normal, ghci_script, ['T10110.script'])
test('T10322', normal, ghci_script, ['T10322.script'])
+test('T10439', normal, ghci_script, ['T10439.script'])
test('T10466', normal, ghci_script, ['T10466.script'])
test('T10501', normal, ghci_script, ['T10501.script'])
test('T10508', normal, ghci_script, ['T10508.script'])