aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/GhcUtils.hs
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2021-06-01 10:31:12 +0300
committerVladislav Zavialov <vlad.z.4096@gmail.com>2021-06-10 13:35:42 +0300
commit0029f289bec7427032785f13cf3bcdebddf7b91f (patch)
tree82117fc6b28036afc26cbab1fcfdf21f0b1c4cb3 /haddock-api/src/Haddock/GhcUtils.hs
parent126beaef07cdcbe8aeea248cc555e8a3057de82b (diff)
HsToken in FunTy, RecConGADT
Diffstat (limited to 'haddock-api/src/Haddock/GhcUtils.hs')
-rw-r--r--haddock-api/src/Haddock/GhcUtils.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs
index fa567da8..599404a0 100644
--- a/haddock-api/src/Haddock/GhcUtils.hs
+++ b/haddock-api/src/Haddock/GhcUtils.hs
@@ -177,11 +177,11 @@ getGADTConType (ConDeclGADT { con_bndrs = L _ outer_bndrs
-- tau_ty :: LHsType DocNameI
tau_ty = case args of
- RecConGADT flds -> mkFunTy (noLocA (HsRecTy noAnn (unLoc flds))) res_ty
+ RecConGADT flds _ -> mkFunTy (noLocA (HsRecTy noAnn (unLoc flds))) res_ty
PrefixConGADT pos_args -> foldr mkFunTy res_ty (map hsScaledThing pos_args)
mkFunTy :: LHsType DocNameI -> LHsType DocNameI -> LHsType DocNameI
- mkFunTy a b = noLocA (HsFunTy noAnn (HsUnrestrictedArrow NormalSyntax) a b)
+ mkFunTy a b = noLocA (HsFunTy noAnn (HsUnrestrictedArrow noHsUniTok) a b)
getGADTConType (ConDeclH98 {}) = panic "getGADTConType"
-- Should only be called on ConDeclGADT
@@ -283,7 +283,7 @@ restrictCons names decls = [ L p d | L p (Just d) <- map (fmap keep) decls ]
ConDeclGADT { con_g_args = con_args' } -> case con_args' of
PrefixConGADT {} -> Just d
- RecConGADT fields
+ RecConGADT fields _
| all field_avail (unLoc fields) -> Just d
| otherwise -> Just (d { con_g_args = PrefixConGADT (field_types $ unLoc fields) })
-- see above