Emit warnings about unused do-bindings
It would be nice if unused do-bindings (i.e. non-unit values) such as getLine
in
unused :: IO ()
unused = do
getLine
return ()
would emit a warning similar to GHC (with -Wall
):
UnusedDo.hs:5:3: warning: [-Wunused-do-bind]
A do-notation statement discarded a result of type ‘String’
Suppress this warning by saying ‘_ <- getLine’
|
5 | getLine
| ^^^^^^^
This would also be a good candidate for a quick fix as proposed in #92.
Related: #62.
Edited by Fredrik Wieczerkowski