diff options
Diffstat (limited to 'compiler/GHC/Parser/PostProcess/Haddock.hs')
-rw-r--r-- | compiler/GHC/Parser/PostProcess/Haddock.hs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/compiler/GHC/Parser/PostProcess/Haddock.hs b/compiler/GHC/Parser/PostProcess/Haddock.hs index 7959db5a7c..0837cac70e 100644 --- a/compiler/GHC/Parser/PostProcess/Haddock.hs +++ b/compiler/GHC/Parser/PostProcess/Haddock.hs @@ -690,22 +690,21 @@ instance HasHaddock (Located (ConDecl GhcPs)) where addHaddock (L l_con_decl con_decl) = extendHdkA l_con_decl $ case con_decl of - ConDeclGADT { con_g_ext, con_names, con_forall, con_qvars, con_mb_cxt, con_args, con_res_ty } -> do + ConDeclGADT { con_g_ext, con_names, con_forall, con_qvars, con_mb_cxt, con_g_args, con_res_ty } -> do -- discardHasInnerDocs is ok because we don't need this info for GADTs. con_doc' <- discardHasInnerDocs $ getConDoc (getLoc (head con_names)) - con_args' <- - case con_args of - PrefixCon ts -> PrefixCon <$> addHaddock ts - RecCon (L l_rec flds) -> do + con_g_args' <- + case con_g_args of + PrefixConGADT ts -> PrefixConGADT <$> addHaddock ts + RecConGADT (L l_rec flds) -> do -- discardHasInnerDocs is ok because we don't need this info for GADTs. flds' <- traverse (discardHasInnerDocs . addHaddockConDeclField) flds - pure $ RecCon (L l_rec flds') - InfixCon _ _ -> panic "ConDeclGADT InfixCon" + pure $ RecConGADT (L l_rec flds') con_res_ty' <- addHaddock con_res_ty pure $ L l_con_decl $ ConDeclGADT { con_g_ext, con_names, con_forall, con_qvars, con_mb_cxt, con_doc = con_doc', - con_args = con_args', + con_g_args = con_g_args', con_res_ty = con_res_ty' } ConDeclH98 { con_ext, con_name, con_forall, con_ex_tvs, con_mb_cxt, con_args } -> addConTrailingDoc (srcSpanEnd l_con_decl) $ |