Commit 1fca115b authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan Committed by Ben Gamari
Browse files

Add regression test for #15321

(cherry picked from commit e835fdb1)
parent 22c951e6
{-# LANGUAGE TemplateHaskell #-}
module T15321 where
foo :: String
foo = test
bar :: String
bar = $(_ "baz")
T15321.hs:9:9: error:
• Found hole: _ :: [Char] -> Language.Haskell.TH.Lib.Internal.ExpQ
• In the expression: _
In the expression: _ "baz"
In the untyped splice: $(_ "baz")
• Valid hole fits include
fail :: forall (m :: * -> *) a. Monad m => String -> m a
with fail @Language.Haskell.TH.Syntax.Q
(imported from ‘Prelude’ at T15321.hs:3:8-13
(and originally defined in ‘GHC.Base’))
......@@ -417,3 +417,4 @@ test('T14885c', normal, compile, [''])
test('T15243', normal, compile, ['-dsuppress-uniques'])
test('T15331', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
test('T15324', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques'])
test('T15321', normal, compile_fail, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment