summaryrefslogtreecommitdiff
path: root/compiler/ghc.cabal.in
diff options
context:
space:
mode:
authorAlfredo Di Napoli <alfredo@well-typed.com>2021-04-06 16:27:14 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-29 17:27:19 -0400
commit7d18e1bace3f3a85eae177654690d91b688c0e8f (patch)
treefca073e898068e90dd49c4ea9243c628dbb4469b /compiler/ghc.cabal.in
parent7bb3443a4fe8acfaa3fec34f58c91173f737777d (diff)
downloadhaskell-7d18e1bace3f3a85eae177654690d91b688c0e8f.tar.gz
Add GhcMessage and ancillary types
This commit adds GhcMessage and ancillary (PsMessage, TcRnMessage, ..) types. These types will be expanded to represent more errors generated by different subsystems within GHC. Right now, they are underused, but more will come in the glorious future. See https://gitlab.haskell.org/ghc/ghc/-/wikis/Errors-as-(structured)-values for a design overview. Along the way, lots of other things had to happen: * Adds Semigroup and Monoid instance for Bag * Fixes #19746 by parsing OPTIONS_GHC pragmas into Located Strings. See GHC.Parser.Header.toArgs (moved from GHC.Utils.Misc, where it didn't belong anyway). * Addresses (but does not completely fix) #19709, now reporting desugarer warnings and errors appropriately for TH splices. Not done: reporting type-checker warnings for TH splices. * Some small refactoring around Safe Haskell inference, in order to keep separate classes of messages separate. * Some small refactoring around initDsTc, in order to keep separate classes of messages separate. * Separate out the generation of messages (that is, the construction of the text block) from the wrapping of messages (that is, assigning a SrcSpan). This is more modular than the previous design, which mixed the two. Close #19746. This was a collaborative effort by Alfredo di Napoli and Richard Eisenberg, with a key assist on #19746 by Iavor Diatchki. Metric Increase: MultiLayerModules
Diffstat (limited to 'compiler/ghc.cabal.in')
-rw-r--r--compiler/ghc.cabal.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in
index f260600ba5..15018529d3 100644
--- a/compiler/ghc.cabal.in
+++ b/compiler/ghc.cabal.in
@@ -384,6 +384,8 @@ Library
GHC.Driver.Env
GHC.Driver.Env.Types
GHC.Driver.Errors
+ GHC.Driver.Errors.Ppr
+ GHC.Driver.Errors.Types
GHC.Driver.Flags
GHC.Driver.Hooks
GHC.Driver.Main
@@ -413,6 +415,8 @@ Library
GHC.HsToCore.Binds
GHC.HsToCore.Coverage
GHC.HsToCore.Docs
+ GHC.HsToCore.Errors.Ppr
+ GHC.HsToCore.Errors.Types
GHC.HsToCore.Expr
GHC.HsToCore.Foreign.Call
GHC.HsToCore.Foreign.Decl
@@ -475,6 +479,7 @@ Library
GHC.Parser.CharClass
GHC.Parser.Errors
GHC.Parser.Errors.Ppr
+ GHC.Parser.Errors.Types
GHC.Parser.Header
GHC.Parser.Lexer
GHC.Parser.PostProcess
@@ -574,6 +579,8 @@ Library
GHC.Tc.Errors
GHC.Tc.Errors.Hole
GHC.Tc.Errors.Hole.FitTypes
+ GHC.Tc.Errors.Ppr
+ GHC.Tc.Errors.Types
GHC.Tc.Gen.Annotation
GHC.Tc.Gen.App
GHC.Tc.Gen.Arrow