[commit: ghc] master: ErrUtils: Expose accessors of ErrDoc and ErrMsg (2d22026)
git at git.haskell.org
git at git.haskell.org
Wed Aug 31 18:29:25 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/2d220263f6e5f49139f5571b7a5bc1649cb9ac8c/ghc
>---------------------------------------------------------------
commit 2d220263f6e5f49139f5571b7a5bc1649cb9ac8c
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Wed Aug 31 13:50:30 2016 -0400
ErrUtils: Expose accessors of ErrDoc and ErrMsg
Test Plan: Validate
Reviewers: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2491
GHC Trac Issues: #12206
>---------------------------------------------------------------
2d220263f6e5f49139f5571b7a5bc1649cb9ac8c
compiler/main/ErrUtils.hs | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/compiler/main/ErrUtils.hs b/compiler/main/ErrUtils.hs
index 21fd7e8..9a4c7fc 100644
--- a/compiler/main/ErrUtils.hs
+++ b/compiler/main/ErrUtils.hs
@@ -13,7 +13,9 @@ module ErrUtils (
Severity(..),
-- * Messages
- MsgDoc, ErrMsg, ErrDoc, errDoc, WarnMsg,
+ ErrMsg, errMsgDoc,
+ ErrDoc, errDoc, errDocImportant, errDocContext, errDocSupplementary,
+ WarnMsg, MsgDoc,
Messages, ErrorMessages, WarningMessages,
unionMessages,
errMsgSpan, errMsgContext,
@@ -22,6 +24,7 @@ module ErrUtils (
-- ** Formatting
pprMessageBag, pprErrMsgBagWithLoc,
pprLocErrMsg, printBagOfErrors,
+ formatErrDoc,
-- ** Construction
emptyMessages, mkLocMessage, mkLocMessageAnn, makeIntoWarning,
@@ -123,11 +126,11 @@ data ErrMsg = ErrMsg {
-- from.
data ErrDoc = ErrDoc {
-- | Primary error msg.
- errDocImportant :: [MsgDoc],
+ errDocImportant :: [MsgDoc],
-- | Context e.g. \"In the second argument of ...\".
- _errDocContext :: [MsgDoc],
+ errDocContext :: [MsgDoc],
-- | Supplementary information, e.g. \"Relevant bindings include ...\".
- _errDocSupplementary :: [MsgDoc]
+ errDocSupplementary :: [MsgDoc]
}
errDoc :: [MsgDoc] -> [MsgDoc] -> [MsgDoc] -> ErrDoc
More information about the ghc-commits
mailing list