ImplicitParams: GHC does not warn about unused implicit parameters
When using -XImplicitParams, and an implicit parameter is not used within a function which accepts said parameter, no warning is issued (with -Wall turned on).
Example:
{-# LANGUAGE ImplicitParams #-}
f :: (?file1 :: String) => IO ()
f = putStrLn $ "f2: "
main :: IO ()
main = let ?file1 = "A" in f
Here, I would expect a warning about ?file1 being unused in f.
As far as I can tell (but I'm quite the layman in these matters), issuing a warning here would be desirable, possible, and quite easy. Sorry for the bug report if there's a reason for the status quo.
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | lowest |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |