diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-10-22 12:21:22 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-10-22 12:21:22 +0100 |
commit | ee02ab5911c0ef95548120f0b5bbc7a37524ff15 (patch) | |
tree | 32f2285d82049c1de5f7095feb806d0d239865d0 /testsuite | |
parent | 6f362e313814e427c27361ff8c440b01c45123d2 (diff) | |
download | haskell-ee02ab5911c0ef95548120f0b5bbc7a37524ff15.tar.gz |
Test Trac #5566
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/ghci/scripts/T5566.hs | 13 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T5566.script | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T5566.stdout | 3 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/all.T | 1 |
4 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T5566.hs b/testsuite/tests/ghci/scripts/T5566.hs new file mode 100644 index 0000000000..9ed2428877 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T5566.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE TemplateHaskell #-} +module T5566 where + +class C a where + c :: a + +$([d| instance C Int where c = 0 |] ) + +data D = D + +$([d| instance C D where c = D |] ) + +$([d| instance Show D where show _ = "D" |] ) diff --git a/testsuite/tests/ghci/scripts/T5566.script b/testsuite/tests/ghci/scripts/T5566.script new file mode 100644 index 0000000000..ec6965150d --- /dev/null +++ b/testsuite/tests/ghci/scripts/T5566.script @@ -0,0 +1,4 @@ +:l T5566 +c :: Int +c :: D +show D diff --git a/testsuite/tests/ghci/scripts/T5566.stdout b/testsuite/tests/ghci/scripts/T5566.stdout new file mode 100644 index 0000000000..ea12c09ff7 --- /dev/null +++ b/testsuite/tests/ghci/scripts/T5566.stdout @@ -0,0 +1,3 @@ +0
+D
+"D"
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 568109c97d..2015b8f34e 100644 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -105,3 +105,4 @@ test('T5130', normal, ghci_script, ['T5130.script']) test('T5417', normal, ghci_script, ['T5417.script']) test('T5545', normal, ghci_script, ['T5545.script']) test('T5557', normal, ghci_script, ['T5557.script']) +test('T5566', normal, ghci_script, ['T5566.script']) |