logo       

Template Haskell, Haddock, -fwarn-missing-signatures don't mix: msg#00054

lang.haskell.glasgow.bugs

Subject: Template Haskell, Haddock, -fwarn-missing-signatures don't mix

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.
module TH2 where

$(
if True
then
[d| a = 2 |]
else
[d| a = 4 |]
)

a :: Int
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise