#3613: Better error messages for do-notation
----------------------------------------+-----------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 6.10.4
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
----------------------------------------+-----------------------------------
Comment (by simonpj):
I agree this is confusing. I had a look at the code. When typechecking
`x <- rhs`, GHC does this (`TcMatches.tcDoStmt`)
* First infers the type of `rhs`
* Then feed that into a typecheck of the bind operator `>>=`
Instead, the programmer expects the reverse, so that information about
which monad is involved gets fed into the argument.
I don't expect anyone else to understand this note; it's an aide-memoire
for me to remind me to fix this.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3613#comment:1>
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