summaryrefslogtreecommitdiff
path: root/compiler/Language
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-02-21 21:16:24 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-01 17:32:12 -0500
commitce85cffc7c3afa55755ae8d1aa027761bf54bed4 (patch)
tree81986b7475f28a20bb80301107f9360a90b1e976 /compiler/Language
parent6429943b0a377e076bcfd26c79ceb27cf2f4a9ab (diff)
downloadhaskell-ce85cffc7c3afa55755ae8d1aa027761bf54bed4.tar.gz
Wrap LHsContext in Maybe in the GHC AST
If the context is missing it is captured as Nothing, rather than putting a noLoc in the ParsedSource. Updates haddock submodule
Diffstat (limited to 'compiler/Language')
-rw-r--r--compiler/Language/Haskell/Syntax/Decls.hs4
-rw-r--r--compiler/Language/Haskell/Syntax/Type.hs2
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/Language/Haskell/Syntax/Decls.hs b/compiler/Language/Haskell/Syntax/Decls.hs
index 453b963028..0df44e8016 100644
--- a/compiler/Language/Haskell/Syntax/Decls.hs
+++ b/compiler/Language/Haskell/Syntax/Decls.hs
@@ -436,7 +436,7 @@ data TyClDecl pass
, tcdDataDefn :: HsDataDefn pass }
| ClassDecl { tcdCExt :: XClassDecl pass, -- ^ Post renamer, FVs
- tcdCtxt :: LHsContext pass, -- ^ Context...
+ tcdCtxt :: Maybe (LHsContext pass), -- ^ Context...
tcdLName :: LIdP pass, -- ^ Name of the class
tcdTyVars :: LHsQTyVars pass, -- ^ Class type variables
tcdFixity :: LexicalFixity, -- ^ Fixity used in the declaration
@@ -891,7 +891,7 @@ data HsDataDefn pass -- The payload of a data type defn
-- @
HsDataDefn { dd_ext :: XCHsDataDefn pass,
dd_ND :: NewOrData,
- dd_ctxt :: LHsContext pass, -- ^ Context
+ dd_ctxt :: Maybe (LHsContext pass), -- ^ Context
dd_cType :: Maybe (XRec pass CType),
dd_kindSig:: Maybe (LHsKind pass),
-- ^ Optional kind signature.
diff --git a/compiler/Language/Haskell/Syntax/Type.hs b/compiler/Language/Haskell/Syntax/Type.hs
index 0427fd65f3..f0114403d8 100644
--- a/compiler/Language/Haskell/Syntax/Type.hs
+++ b/compiler/Language/Haskell/Syntax/Type.hs
@@ -736,7 +736,7 @@ data HsType pass
| HsQualTy -- See Note [HsType binders]
{ hst_xqual :: XQualTy pass
- , hst_ctxt :: LHsContext pass -- Context C => blah
+ , hst_ctxt :: Maybe (LHsContext pass) -- Context C => blah
, hst_body :: LHsType pass }
| HsTyVar (XTyVar pass)