summaryrefslogtreecommitdiff
path: root/compiler/GHC.hs
diff options
context:
space:
mode:
authorAlfredo Di Napoli <alfredo@well-typed.com>2021-01-04 15:35:47 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-22 15:00:47 -0500
commita64f21e9f6bd949847d3c8fa1e427e5c763ccd7f (patch)
treecdf6eb8daa58254190a0c8dacdc681b13c3ba884 /compiler/GHC.hs
parent34950fb84b85d964e30ae9eca995b84fbf4fd165 (diff)
downloadhaskell-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.hs')
-rw-r--r--compiler/GHC.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs
index f52dc5b657..c7e7e5c826 100644
--- a/compiler/GHC.hs
+++ b/compiler/GHC.hs
@@ -1474,7 +1474,7 @@ getNameToInstancesIndex :: GhcMonad m
-- if it is visible from at least one module in the list.
-> Maybe [Module] -- ^ modules to load. If this is not specified, we load
-- modules for everything that is in scope unqualified.
- -> m (Messages, Maybe (NameEnv ([ClsInst], [FamInst])))
+ -> m (Messages ErrDoc, Maybe (NameEnv ([ClsInst], [FamInst])))
getNameToInstancesIndex visible_mods mods_to_load = do
hsc_env <- getSession
liftIO $ runTcInteractive hsc_env $