|
Template Haskell, Haddock, -fwarn-missing-signatures don't mix: msg#00054lang.haskell.glasgow.bugs
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> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-1018607 ] I thought linux was for developers?, SourceForge.net |
|---|---|
| Next by Date: | -fwarn-unused-binds misses a use, George Russell |
| Previous by Thread: | [ ghc-Bugs-940294 ] Language.Haskell.Pretty misformats, SourceForge.net |
| Next by Thread: | -fwarn-unused-binds misses a use, George Russell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |