From a64f21e9f6bd949847d3c8fa1e427e5c763ccd7f Mon Sep 17 00:00:00 2001 From: Alfredo Di Napoli Date: Mon, 4 Jan 2021 15:35:47 +0100 Subject: Parameterise Messages over e This commit paves the way to a richer and more structured representation of GHC error messages, as per GHC proposal #306. More specifically 'Messages' from 'GHC.Types.Error' now gains an extra type parameter, that we instantiate to 'ErrDoc' for now. Later, this will allow us to replace ErrDoc with something more structure (for example messages coming from the parser, the typechecker etc). --- compiler/GHC/Tc/Solver.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/GHC/Tc/Solver.hs') diff --git a/compiler/GHC/Tc/Solver.hs b/compiler/GHC/Tc/Solver.hs index 2d97b84e9d..7e1f919e1f 100644 --- a/compiler/GHC/Tc/Solver.hs +++ b/compiler/GHC/Tc/Solver.hs @@ -60,7 +60,7 @@ import GHC.Utils.Panic import GHC.Types.Var import GHC.Types.Var.Set import GHC.Types.Basic ( IntWithInf, intGtLimit ) -import GHC.Utils.Error ( emptyMessages ) +import GHC.Types.Error import qualified GHC.LanguageExtensions as LangExt import Control.Monad @@ -149,7 +149,7 @@ simplifyTop wanteds ; warnAllUnsolved $ emptyWC { wc_simple = unsafe_ol } - ; whyUnsafe <- fst <$> TcM.readTcRef errs_var + ; whyUnsafe <- getWarningMessages <$> TcM.readTcRef errs_var ; TcM.writeTcRef errs_var saved_msg ; recordUnsafeInfer whyUnsafe } -- cgit v1.2.1