[commit: ghc] master: Allow proper errors/warnings in core2core passes (e2b5738)
git at git.haskell.org
git at git.haskell.org
Wed Aug 5 13:25:09 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/e2b5738141d1f60858e53ed1edd7167b1a93800c/ghc
>---------------------------------------------------------------
commit e2b5738141d1f60858e53ed1edd7167b1a93800c
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Aug 5 13:31:48 2015 +0100
Allow proper errors/warnings in core2core passes
This patch makes it possible for core-to-core passes to emit
proper error messages and warnings.
* New function CoreMonad.warnMsg
* CoreMonad.warnMsg and errorMsg now print a proper warning/error
message heading.
* CoreMonad carries a SrcSpan, which is used in warning/error
messages. It is initialised to be the source file name, but
a core-to-core pass could set it more specifically if it had
better location information.
There was a bit of plumbing needed to get the filename to the
right place.
>---------------------------------------------------------------
e2b5738141d1f60858e53ed1edd7167b1a93800c
compiler/basicTypes/SrcLoc.hs | 10 ++++---
compiler/coreSyn/CoreLint.hs | 3 +-
compiler/deSugar/Desugar.hs | 7 +++++
compiler/main/ErrUtils.hs | 17 +++++++++--
compiler/main/ErrUtils.hs-boot | 5 ++--
compiler/main/HscMain.hs | 2 ++
compiler/main/HscTypes.hs | 1 +
compiler/simplCore/CoreMonad.hs | 66 ++++++++++++++++++++++++++++-------------
compiler/simplCore/SimplCore.hs | 14 +++++----
9 files changed, 90 insertions(+), 35 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 e2b5738141d1f60858e53ed1edd7167b1a93800c
More information about the ghc-commits
mailing list