summaryrefslogtreecommitdiff
path: root/compiler/GHC/Iface/Ext/Ast.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-02-21 21:16:24 +0000
committerAlan Zimmerman <alan.zimm@gmail.com>2021-02-28 12:46:19 +0000
commit09947ecee1bdc450ce561543f68bee6765122fb5 (patch)
tree960d25ad941ce1ef14ca3ba1581a041708685f9b /compiler/GHC/Iface/Ext/Ast.hs
parent035d983dfa217bf8784b86e78d6024a3ca1a3f4f (diff)
downloadhaskell-09947ecee1bdc450ce561543f68bee6765122fb5.tar.gz
Wrap LHsContext in Maybe in the GHC ASTwip/az/maybecontext
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/GHC/Iface/Ext/Ast.hs')
-rw-r--r--compiler/GHC/Iface/Ext/Ast.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Iface/Ext/Ast.hs b/compiler/GHC/Iface/Ext/Ast.hs
index dfa0b91e9b..3fe14085a9 100644
--- a/compiler/GHC/Iface/Ext/Ast.hs
+++ b/compiler/GHC/Iface/Ext/Ast.hs
@@ -1393,7 +1393,7 @@ instance ToHie (Located (TyClDecl GhcRn)) where
, toHie defn
]
where
- quant_scope = mkLScope $ dd_ctxt defn
+ quant_scope = mkLScope $ fromMaybe (noLoc []) $ dd_ctxt defn
rhs_scope = sig_sc `combineScopes` con_sc `combineScopes` deriv_sc
sig_sc = maybe NoScope mkLScope $ dd_kindSig defn
con_sc = foldr combineScopes NoScope $ map mkLScope $ dd_cons defn
@@ -1418,7 +1418,7 @@ instance ToHie (Located (TyClDecl GhcRn)) where
, toHie deftyps
]
where
- context_scope = mkLScope context
+ context_scope = mkLScope $ fromMaybe (noLoc []) context
rhs_scope = foldl1' combineScopes $ map mkScope
[ loc deps, loc sigs, loc (bagToList meths), loc typs, loc deftyps]