[commit: ghc] master: Refactor FFI error messages (92587bf)
git at git.haskell.org
git at git.haskell.org
Fri Jul 25 15:22:50 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/92587bfefea2b78f89bcdad27e0da5711463fd1b/ghc
>---------------------------------------------------------------
commit 92587bfefea2b78f89bcdad27e0da5711463fd1b
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Jul 25 16:22:21 2014 +0100
Refactor FFI error messages
This patch was provoked by Trac #5610, which I finally got a moment to look at.
In the end I added a new data type ErrUtils.Validity,
data Validity
= IsValid -- Everything is fine
| NotValid MsgDoc -- A problem, and some indication of why
with some suitable combinators, and used it where appropriate (which touches
quite a few modules). The main payoff is that error messages improve for
FFI type validation.
>---------------------------------------------------------------
92587bfefea2b78f89bcdad27e0da5711463fd1b
compiler/main/ErrUtils.lhs | 31 ++++-
compiler/rename/RnExpr.lhs | 72 +++++------
compiler/typecheck/FunDeps.lhs | 10 +-
compiler/typecheck/TcDeriv.lhs | 105 ++++++++---------
compiler/typecheck/TcForeign.lhs | 131 ++++++++++-----------
compiler/typecheck/TcGenGenerics.lhs | 59 +++++-----
compiler/typecheck/TcType.lhs | 112 +++++++++---------
compiler/typecheck/TcValidity.lhs | 4 +-
testsuite/tests/ffi/should_fail/T3066.stderr | 7 +-
testsuite/tests/ffi/should_fail/T5664.stderr | 7 +-
testsuite/tests/ffi/should_fail/T7506.stderr | 5 +-
testsuite/tests/ffi/should_fail/ccfail001.stderr | 7 +-
testsuite/tests/ffi/should_fail/ccfail002.stderr | 6 +-
testsuite/tests/ffi/should_fail/ccfail003.stderr | 6 +-
testsuite/tests/ffi/should_fail/ccfail004.stderr | 22 +++-
testsuite/tests/ffi/should_fail/ccfail005.stderr | 6 +-
testsuite/tests/safeHaskell/ghci/p6.stderr | 2 +-
.../safeHaskell/safeLanguage/SafeLang08.stderr | 4 +-
18 files changed, 322 insertions(+), 274 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 92587bfefea2b78f89bcdad27e0da5711463fd1b
More information about the ghc-commits
mailing list