Commit 08a4aa7c authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #6114

parent 3ae71382
{-# LANGUAGE TemplateHaskell #-}
module T6114 where
import Language.Haskell.TH
import Control.Monad.Instances ()
instanceVar = $(do
xName <- newName "x"
instanceType <- [t| $(varT xName) |]
_ <- reifyInstances ''Eq [instanceType]
undefined
)
T6114.hs:6:17:
The exact Name `x' is not in scope
Probable cause: you used a unique Template Haskell name (NameU),
perhaps via newName, but did not bind it
If that's it, then -ddump-splices might be useful
In the argument of reifyInstances: GHC.Classes.Eq x_0
In the expression:
$(do { xName <- newName "x";
instanceType <- [t| $(varT xName) |];
_ <- reifyInstances ''Eq [instanceType];
.... })
In an equation for `instanceVar':
instanceVar
= $(do { xName <- newName "x";
instanceType <- [t| $(varT xName) |];
.... })
......@@ -243,3 +243,4 @@ test('T5976', normal, compile_fail, ['-v0'])
test('T5795', normal, compile_fail, ['-v0'])
test('T6005', normal, compile, ['-v0'])
test('T6005a', normal, compile, ['-v0'])
test('T6114', normal, compile_fail, ['-v0 -dsuppress-uniques'])
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