diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-08-31 13:50:30 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-08-31 14:28:29 -0400 |
commit | 2d220263f6e5f49139f5571b7a5bc1649cb9ac8c (patch) | |
tree | 7bb667bc15c6813bfacdc3886cb0739ffa81fdb1 | |
parent | 22259c17c5e3043e5fa5b354f339f9b0d66167db (diff) | |
download | haskell-2d220263f6e5f49139f5571b7a5bc1649cb9ac8c.tar.gz |
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
-rw-r--r-- | compiler/main/ErrUtils.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/main/ErrUtils.hs b/compiler/main/ErrUtils.hs index 21fd7e8dd2..9a4c7fc2b5 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 |