[commit: ghc] ghc-8.0: ErrUtils: Expose accessors of ErrDoc and ErrMsg (99bb8ff)

git at git.haskell.org git at git.haskell.org
Wed Aug 31 23:23:57 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/99bb8ffe85ab135b3928b790818c0d5bbbb747a4/ghc

>---------------------------------------------------------------

commit 99bb8ffe85ab135b3928b790818c0d5bbbb747a4
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
    
    (cherry picked from commit 2d220263f6e5f49139f5571b7a5bc1649cb9ac8c)


>---------------------------------------------------------------

99bb8ffe85ab135b3928b790818c0d5bbbb747a4
 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 3675b85..0cb40d2 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,
@@ -127,11 +130,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