Commit 2d220263 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

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
parent 22259c17
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment