aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/Create.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-02-22 20:04:24 +0000
committerAlan Zimmerman <alan.zimm@gmail.com>2021-02-22 20:04:24 +0000
commit8241d9e700e043b86b609c334494c4632848389f (patch)
tree58cc739b2a3f9aa70c344a8c98994bd6c8b03172 /haddock-api/src/Haddock/Interface/Create.hs
parentd1b7f181b60ba3ac191183f1512e66793d28ac08 (diff)
Context becomes a Maybe in the GHC AST
This prevents noLoc's appearing in the ParsedSource. Match the change in GHC.
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Create.hs')
-rw-r--r--haddock-api/src/Haddock/Interface/Create.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index 9a773b6c..4357cb79 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -1098,9 +1098,9 @@ extractPatternSyn nm t tvs cons =
typ = longArrow args (data_ty con)
typ' =
case con of
- ConDeclH98 { con_mb_cxt = Just cxt } -> noLoc (HsQualTy noExtField cxt typ)
+ ConDeclH98 { con_mb_cxt = Just cxt } -> noLoc (HsQualTy noExtField (Just cxt) typ)
_ -> typ
- typ'' = noLoc (HsQualTy noExtField (noLoc []) typ')
+ typ'' = noLoc (HsQualTy noExtField Nothing typ')
in PatSynSig noExtField [noLoc nm] (mkEmptySigType typ'')
longArrow :: [LHsType GhcRn] -> LHsType GhcRn -> LHsType GhcRn