Template Haskell, Haddock, -fwarn-missing-signatures don't mix
George Russell
ger at informatik.uni-bremen.de
Tue Aug 31 05:58:54 EDT 2004
Not so much a bug this as a whinge:
# ghc -c TH2.hs -fwarn-missing-signatures -fglasgow-exts
Loading package base ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package haskell-src ... linking ... done.
TH2.hs:6: Warning: Definition but no type signature for `a'
TH2.hs:8: Warning: Definition but no type signature for `a'
The problem here is that the type signature for 'a' is outside the
splice while the definition is inside. This is a useful idiom for
me, since for Haddock I preprocess files to strip out Template
Haskell splices, but still want Haddock to see a type signature.
-------------- next part --------------
module TH2 where
$(
if True
then
[d| a = 2 |]
else
[d| a = 4 |]
)
a :: Int
More information about the Glasgow-haskell-bugs
mailing list