Refactor, and improve error messages (cf Trac #3395)
authorsimonpj@microsoft.com <unknown>
Tue, 11 Aug 2009 14:36:55 +0000 (14:36 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 11 Aug 2009 14:36:55 +0000 (14:36 +0000)
commit74fadd40c435b13da51695f0ec490e03ccce56e4
treef431f261a2eb141e9145b29ac7b8ed9f2fb5fc60
parent708533dec3189bb624c8467627055a78de07e52b
Refactor, and improve error messages (cf Trac #3395)

The Convert stuff should not panic if the programmer hands over an
invalid TH term; instead it should give a graceful error message.
Largely this had been done, but not for do-blocks, so this patch
fixes that problem.

Moreover, I did some refactoring and tidying up, which is why
so many lines of code have changed
compiler/hsSyn/Convert.lhs