diff options
author | Alfredo Di Napoli <alfredo@well-typed.com> | 2021-01-04 15:35:47 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-22 15:00:47 -0500 |
commit | a64f21e9f6bd949847d3c8fa1e427e5c763ccd7f (patch) | |
tree | cdf6eb8daa58254190a0c8dacdc681b13c3ba884 /compiler/GHC/Tc/Solver.hs | |
parent | 34950fb84b85d964e30ae9eca995b84fbf4fd165 (diff) | |
download | haskell-a64f21e9f6bd949847d3c8fa1e427e5c763ccd7f.tar.gz |
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).
Diffstat (limited to 'compiler/GHC/Tc/Solver.hs')
-rw-r--r-- | compiler/GHC/Tc/Solver.hs | 4 |
1 files changed, 2 insertions, 2 deletions
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 } |