Ticket #3908 (closed bug: wontfix)
"Defined but not used" for variable used in Template Haskell splice
Description
I encountered this warning on valid code using Template Haskell ; I had to change "name" to "_name" to make it compile warning-free.
Test case:
{-# LANGUAGE FlexibleInstances, TemplateHaskell #-}
import Language.Haskell.TH
main :: IO ()
main = do
let name = mkName "name"
decl <- runQ [d| instance Show $(conT name) where show = undefined |]
print decl
Warnings:
TestCase.hs:6:8: Warning: Defined but not used: `name'
I found ticket #3873, but I don't know if it represents the same bug.
Change History
Note: See
TracTickets for help on using
tickets.
