Opened 10 years ago

Closed 10 years ago

#3873 closed bug (fixed)

template haskell: incorrect Warning: defined but not used

Reported by: JakeWheat Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.12.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect warning at compile-time Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


example code:

{-# LANGUAGE TemplateHaskell #-}

module THWarnBug where

import Language.Haskell.TH

mhlt :: Q Type
mhlt = do
  let u = [t| String |]
  [t| $u |]

compiling gives:

$ ghc -c -Wall THWarnBug.hs 

THWarnBug.hs:9:6: Warning: Defined but not used: `u'

but obviously u is used.

Change History (1)

comment:1 Changed 10 years ago by simonpj

Resolution: fixed
Status: newclosed

Happily the fix for #3845 does this too.


Note: See TracTickets for help on using tickets.