#3263: Warnings for monadic values not used
------------------------------+---------------------------------------------
Reporter: NeilMitchell | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.2
Severity: normal | Resolution:
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
------------------------------+---------------------------------------------
Comment (by NeilMitchell):
We don't need to worry about non-returning functions. Remember {{{do ... ;
exitWith ...}}} won't be an error, only if they put a statement after it -
which is probably an error since you know it won't execute.
I don't suggest giving specific errors in specific circumstances, it's not
something GHC does in general. For this I would recommend programmers use
HLint, and I'll make {{{_ <- mapM}}} be a suggestion there.
My guess would be hardcode () and any Monad, as a first step that is very
nearly perfect and fairly simple.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3263#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs