Skip to content

A fix to an error message in monad comprehensions, and a move of dsHandleMonadicFailure

cgibbard requested to merge obsidiansystems/ghc:cg-post-2330 into master

In the comments on !2330 (closed), SPJ requested that dsHandleMonadicFailure be moved to what is now GHC.HsToCore.Utils and there was a remark that an error message had changed from referring to a monad comprehension to a do expression.

I changed dsHandleMonadicFailure to take an an HsStmtContext, so that it should now appropriately report what sort of statement the pattern match occurred in, and while I was at it, moved the function as requested.

!2330 (comment 243173)

Thank you for your contribution to GHC!

Please take a few moments to verify that your commits fulfill the following:

  • are either individually buildable or squashed
  • have commit messages which describe what they do (referring to Notes and tickets using #NNNN syntax when appropriate)
  • have added source comments describing your change. For larger changes you likely should add a Note and cross-reference it from the relevant places.
  • add a testcase to the testsuite.
  • replace this message with a description motivating your change

If you have any questions don't hesitate to open your merge request and inquire in a comment. If your patch isn't quite done yet please do add prefix your MR title with WIP:.

Merge request reports