diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-04-26 16:24:39 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-04-28 15:40:04 -0400 |
commit | 4b9764db7c190de377c06dfc71bfe6e4b37c7eb0 (patch) | |
tree | b921313bb40e860fa870a20f380a800bbef30143 /testsuite/tests | |
parent | c62271a21b1ba1d207aaebf370c87dd884fa6ae1 (diff) | |
download | haskell-4b9764db7c190de377c06dfc71bfe6e4b37c7eb0.tar.gz |
Define a Quote IO instance
Fixes #18103.
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/quotes/T18103.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/quotes/TH_localname.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/quotes/all.T | 1 |
3 files changed, 12 insertions, 2 deletions
diff --git a/testsuite/tests/quotes/T18103.hs b/testsuite/tests/quotes/T18103.hs new file mode 100644 index 0000000000..6965c2d2c3 --- /dev/null +++ b/testsuite/tests/quotes/T18103.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE TemplateHaskellQuotes #-} +module T18103 where + +import Language.Haskell.TH + +ex :: IO [Dec] +ex = [d| foo x = x |] diff --git a/testsuite/tests/quotes/TH_localname.stderr b/testsuite/tests/quotes/TH_localname.stderr index 6d0ccc91ec..db549a63e2 100644 --- a/testsuite/tests/quotes/TH_localname.stderr +++ b/testsuite/tests/quotes/TH_localname.stderr @@ -7,8 +7,10 @@ TH_localname.hs:3:11: error: x :: t0 -> m0 Language.Haskell.TH.Syntax.Exp (bound at TH_localname.hs:3:1) Probable fix: use a type annotation to specify what ‘m0’ should be. - These potential instance exist: - one instance involving out-of-scope types + These potential instances exist: + instance Language.Haskell.TH.Syntax.Quote IO + -- Defined in ‘Language.Haskell.TH.Syntax’ + ...plus one instance involving out-of-scope types (use -fprint-potential-instances to see them all) • In the expression: [| y |] diff --git a/testsuite/tests/quotes/all.T b/testsuite/tests/quotes/all.T index 1a5d5242b4..fe2a8e5e54 100644 --- a/testsuite/tests/quotes/all.T +++ b/testsuite/tests/quotes/all.T @@ -17,6 +17,7 @@ test('T9824', normal, compile, ['-v0']) test('T10384', normal, compile_fail, ['']) test('T16384', req_th, compile, ['']) test('T17857', normal, compile, ['']) +test('T18103', normal, compile, ['']) test('TH_tf2', normal, compile, ['-v0']) test('TH_ppr1', normal, compile_and_run, ['']) |