[Git][ghc/ghc][wip/int-index/tok-where] WIP: Use LHsToken for class, where
Vladislav Zavialov (@int-index)
gitlab at gitlab.haskell.org
Sun Dec 4 17:04:22 UTC 2022
Vladislav Zavialov pushed to branch wip/int-index/tok-where at Glasgow Haskell Compiler / GHC
Commits:
7515ec98 by Vladislav Zavialov at 2022-12-04T20:04:07+03:00
WIP: Use LHsToken for class, where
Updates the haddock submodule.
- - - - -
15 changed files:
- compiler/GHC/Data/Strict.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Parser/PostProcess/Haddock.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/ThToHs.hs
- compiler/Language/Haskell/Syntax/Decls.hs
- testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- testsuite/tests/parser/should_compile/T20452.stderr
- utils/check-exact/ExactPrint.hs
- utils/haddock
Changes:
=====================================
compiler/GHC/Data/Strict.hs
=====================================
@@ -9,6 +9,7 @@
module GHC.Data.Strict (
Maybe(Nothing, Just),
fromMaybe,
+ isNothing,
Pair(And),
-- Not used at the moment:
@@ -29,6 +30,10 @@ fromMaybe :: a -> Maybe a -> a
fromMaybe d Nothing = d
fromMaybe _ (Just x) = x
+isNothing :: Maybe a -> Bool
+isNothing Nothing = True
+isNothing (Just _) = False
+
apMaybe :: Maybe (a -> b) -> Maybe a -> Maybe b
apMaybe (Just f) (Just x) = Just (f x)
apMaybe _ _ = Nothing
=====================================
compiler/GHC/Hs/Decls.hs
=====================================
@@ -131,6 +131,7 @@ import GHC.Data.Bag
import GHC.Data.Maybe
import Data.Data (Data)
import Data.Foldable (toList)
+import qualified GHC.Data.Strict as Strict
{-
************************************************************************
@@ -446,9 +447,11 @@ instance (OutputableBndrId p) => Outputable (TyClDecl (GhcPass p)) where
ppr (ClassDecl {tcdCtxt = context, tcdLName = lclas, tcdTyVars = tyvars,
tcdFixity = fixity,
tcdFDs = fds,
+ tcdTkWhere = tkWhere,
tcdSigs = sigs, tcdMeths = methods,
tcdATs = ats, tcdATDefs = at_defs})
| null sigs && isEmptyBag methods && null ats && null at_defs -- No "where" part
+ && Strict.isNothing tkWhere
= top_matter
| otherwise -- Laid out
=====================================
compiler/GHC/Parser.y
=====================================
@@ -1244,8 +1244,8 @@ topdecl :: { LHsDecl GhcPs }
--
cl_decl :: { LTyClDecl GhcPs }
: 'class' tycl_hdr fds where_cls
- {% (mkClassDecl (comb4 $1 $2 $3 $4) $2 $3 (sndOf3 $ unLoc $4) (thdOf3 $ unLoc $4))
- (mj AnnClass $1:(fst $ unLoc $3)++(fstOf3 $ unLoc $4)) }
+ {% (mkClassDecl (comb4 $1 $2 $3 $4) (hsTok $1) $2 $3 (snd $ unLoc $4))
+ (mj AnnClass $1:(fst $ unLoc $3)++(fst $ unLoc $4)) }
-- Type declarations (toplevel)
--
@@ -1721,14 +1721,14 @@ decllist_cls
-- Class body
--
-where_cls :: { Located ([AddEpAnn]
- ,(OrdList (LHsDecl GhcPs)) -- Reversed
- ,LayoutInfo GhcPs) }
+where_cls :: { Located ([AddEpAnn], PsClassWhereClause) }
-- No implicit parameters
-- May have type declarations
: 'where' decllist_cls { sLL $1 $> (mj AnnWhere $1:(fstOf3 $ unLoc $2)
- ,sndOf3 $ unLoc $2,thdOf3 $ unLoc $2) }
- | {- empty -} { noLoc ([],nilOL,NoLayoutInfo) }
+ ,PsClassWhereClause (thdOf3 $ unLoc $2)
+ (Strict.Just (hsTok $1))
+ (sndOf3 $ unLoc $2)) }
+ | {- empty -} { noLoc ([],PsClassWhereClause NoLayoutInfo Strict.Nothing nilOL) }
-- Declarations in instance bodies
--
=====================================
compiler/GHC/Parser/PostProcess.hs
=====================================
@@ -22,7 +22,7 @@ module GHC.Parser.PostProcess (
mkHsIntegral, mkHsFractional, mkHsIsString,
mkHsDo, mkSpliceDecl,
mkRoleAnnotDecl,
- mkClassDecl,
+ PsClassWhereClause(..), mkClassDecl,
mkTyData, mkDataFamInst,
mkTySynonym, mkTyFamInstEqn,
mkStandaloneKindSig,
@@ -188,27 +188,41 @@ mkTyClD (L loc d) = L loc (TyClD noExtField d)
mkInstD :: LInstDecl (GhcPass p) -> LHsDecl (GhcPass p)
mkInstD (L loc d) = L loc (InstD noExtField d)
+data PsClassWhereClause =
+ PsClassWhereClause {
+ pcwcLayoutInfo :: !(LayoutInfo GhcPs),
+ pcwcTkWhere :: !(Strict.Maybe (LHsToken "where" GhcPs)),
+ pcwcDecls :: !(OrdList (LHsDecl GhcPs)) -- Reversed
+ }
+
mkClassDecl :: SrcSpan
+ -> LHsToken "class" GhcPs
-> Located (Maybe (LHsContext GhcPs), LHsType GhcPs)
-> Located (a,[LHsFunDep GhcPs])
- -> OrdList (LHsDecl GhcPs)
- -> LayoutInfo GhcPs
+ -> PsClassWhereClause
-> [AddEpAnn]
-> P (LTyClDecl GhcPs)
-mkClassDecl loc' (L _ (mcxt, tycl_hdr)) fds where_cls layoutInfo annsIn
+mkClassDecl loc' tkClass (L _ (mcxt, tycl_hdr)) fds pcwc annsIn
= do { let loc = noAnnSrcSpan loc'
- ; (binds, sigs, ats, at_defs, _, docs) <- cvBindsAndSigs where_cls
+ ; let PsClassWhereClause
+ { pcwcLayoutInfo = layoutInfo
+ , pcwcTkWhere = tkWhere
+ , pcwcDecls = decls
+ } = pcwc
+ ; (binds, sigs, ats, at_defs, _, docs) <- cvBindsAndSigs decls
; (cls, tparams, fixity, ann) <- checkTyClHdr True tycl_hdr
; tyvars <- checkTyVars (text "class") whereDots cls tparams
; cs <- getCommentsFor (locA loc) -- Get any remaining comments
; let anns' = addAnns (EpAnn (spanAsAnchor $ locA loc) annsIn emptyComments) ann cs
; return (L loc (ClassDecl { tcdCExt = (anns', NoAnnSortKey)
, tcdLayout = layoutInfo
+ , tcdTkClass = tkClass
, tcdCtxt = mcxt
, tcdLName = cls, tcdTyVars = tyvars
, tcdFixity = fixity
, tcdFDs = snd (unLoc fds)
+ , tcdTkWhere = tkWhere
, tcdSigs = mkClassOpSigs sigs
, tcdMeths = binds
, tcdATs = ats, tcdATDefs = at_defs
=====================================
compiler/GHC/Parser/PostProcess/Haddock.hs
=====================================
@@ -498,8 +498,8 @@ instance HasHaddock (HsDecl GhcPs) where
-- -- ^ Comment on the second method
--
addHaddock (TyClD _ decl)
- | ClassDecl { tcdCExt = (x, NoAnnSortKey), tcdLayout,
- tcdCtxt, tcdLName, tcdTyVars, tcdFixity, tcdFDs,
+ | ClassDecl { tcdCExt = (x, NoAnnSortKey), tcdLayout, tcdTkClass,
+ tcdCtxt, tcdLName, tcdTyVars, tcdFixity, tcdFDs, tcdTkWhere,
tcdSigs, tcdMeths, tcdATs, tcdATDefs } <- decl
= do
registerHdkA tcdLName
@@ -509,8 +509,8 @@ instance HasHaddock (HsDecl GhcPs) where
flattenBindsAndSigs (tcdMeths, tcdSigs, tcdATs, tcdATDefs, [], [])
pure $
let (tcdMeths', tcdSigs', tcdATs', tcdATDefs', _, tcdDocs) = partitionBindsAndSigs where_cls'
- decl' = ClassDecl { tcdCExt = (x, NoAnnSortKey), tcdLayout
- , tcdCtxt, tcdLName, tcdTyVars, tcdFixity, tcdFDs
+ decl' = ClassDecl { tcdCExt = (x, NoAnnSortKey), tcdLayout, tcdTkClass
+ , tcdCtxt, tcdLName, tcdTyVars, tcdFixity, tcdFDs, tcdTkWhere
, tcdSigs = tcdSigs'
, tcdMeths = tcdMeths'
, tcdATs = tcdATs'
=====================================
compiler/GHC/Rename/Module.hs
=====================================
@@ -1840,9 +1840,12 @@ rnTyClDecl (DataDecl
, tcdDExt = rn_info }, fvs) } }
rnTyClDecl (ClassDecl { tcdLayout = layout,
+ tcdTkClass = tkClass,
tcdCtxt = context, tcdLName = lcls,
tcdTyVars = tyvars, tcdFixity = fixity,
- tcdFDs = fds, tcdSigs = sigs,
+ tcdFDs = fds,
+ tcdTkWhere = tkWhere,
+ tcdSigs = sigs,
tcdMeths = mbinds, tcdATs = ats, tcdATDefs = at_defs,
tcdDocs = docs})
= do { lcls' <- lookupLocatedTopConstructorRnN lcls
@@ -1895,9 +1898,12 @@ rnTyClDecl (ClassDecl { tcdLayout = layout,
; let all_fvs = meth_fvs `plusFV` stuff_fvs `plusFV` fv_at_defs
; docs' <- traverse rnLDocDecl docs
; return (ClassDecl { tcdLayout = rnLayoutInfo layout,
+ tcdTkClass = tkClass,
tcdCtxt = context', tcdLName = lcls',
tcdTyVars = tyvars', tcdFixity = fixity,
- tcdFDs = fds', tcdSigs = sigs',
+ tcdFDs = fds',
+ tcdTkWhere = tkWhere,
+ tcdSigs = sigs',
tcdMeths = mbinds', tcdATs = ats', tcdATDefs = at_defs',
tcdDocs = docs', tcdCExt = all_fvs },
all_fvs ) }
=====================================
compiler/GHC/ThToHs.hs
=====================================
@@ -52,6 +52,7 @@ import GHC.Utils.Lexeme
import GHC.Utils.Misc
import GHC.Data.FastString
import GHC.Utils.Panic
+import qualified GHC.Data.Strict as Strict
import Language.Haskell.Syntax.Basic (FieldLabelString(..))
@@ -321,9 +322,12 @@ cvtDec (ClassD ctxt cl tvs fds decs)
(failWith $ DefaultDataInstDecl adts')
; returnJustLA $ TyClD noExtField $
ClassDecl { tcdCExt = (noAnn, NoAnnSortKey), tcdLayout = NoLayoutInfo
+ , tcdTkClass = noHsTok
, tcdCtxt = mkHsContextMaybe cxt', tcdLName = tc', tcdTyVars = tvs'
, tcdFixity = Prefix
- , tcdFDs = fds', tcdSigs = Hs.mkClassOpSigs sigs'
+ , tcdFDs = fds'
+ , tcdTkWhere = Strict.Nothing
+ , tcdSigs = Hs.mkClassOpSigs sigs'
, tcdMeths = binds'
, tcdATs = fams', tcdATDefs = at_defs', tcdDocs = [] }
-- no docs in TH ^^
=====================================
compiler/Language/Haskell/Syntax/Decls.hs
=====================================
@@ -99,6 +99,7 @@ import Language.Haskell.Syntax.Extension
import Language.Haskell.Syntax.Type
import Language.Haskell.Syntax.Basic (Role)
+import qualified GHC.Data.Strict as Strict
import GHC.Types.Basic (TopLevelFlag, OverlapMode, RuleName, Activation)
import GHC.Types.ForeignCall (CType, CCallConv, Safety, Header, CLabelString, CCallTarget, CExportSpec)
import GHC.Types.Fixity (LexicalFixity)
@@ -457,11 +458,13 @@ data TyClDecl pass
| ClassDecl { tcdCExt :: XClassDecl pass, -- ^ Post renamer, FVs
tcdLayout :: !(LayoutInfo pass), -- ^ Explicit or virtual braces
-- See Note [Class LayoutInfo]
+ tcdTkClass :: !(LHsToken "class" pass), -- ^ The "class" token
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
tcdFDs :: [LHsFunDep pass], -- ^ Functional deps
+ tcdTkWhere :: !(Strict.Maybe (LHsToken "where" pass)), -- ^ The "where" token
tcdSigs :: [LSig pass], -- ^ Methods' signatures
tcdMeths :: LHsBinds pass, -- ^ Default methods
tcdATs :: [LFamilyDecl pass], -- ^ Associated types;
=====================================
testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
=====================================
@@ -61,6 +61,10 @@
(NoAnnSortKey))
(VirtualBraces
(3))
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:5:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:5:7-8 })
@@ -85,6 +89,11 @@
{OccName: a}))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:5:12-16 }))
+ (HsTok)))
[(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:6:3-16 })
(ClassOpSig
@@ -198,6 +207,10 @@
(NoAnnSortKey))
(VirtualBraces
(3))
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:9:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:9:7-8 })
@@ -222,6 +235,11 @@
{OccName: a}))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:9:12-16 }))
+ (HsTok)))
[(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:10:3-16 })
(ClassOpSig
@@ -333,6 +351,10 @@
(NoAnnSortKey))
(VirtualBraces
(3))
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:13:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:13:7-8 })
@@ -357,6 +379,11 @@
{OccName: a}))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:13:12-16 }))
+ (HsTok)))
[(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:14:3-16 })
(ClassOpSig
@@ -471,6 +498,10 @@
(NoAnnSortKey))
(VirtualBraces
(3))
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:17:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:17:7-8 })
@@ -495,6 +526,11 @@
{OccName: a}))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:17:12-16 }))
+ (HsTok)))
[(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:18:3-16 })
(ClassOpSig
@@ -669,6 +705,10 @@
(TokenLoc
(EpaSpan { T17544.hs:22:30 }))
(HsTok)))
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:22:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:22:7-8 })
@@ -693,6 +733,11 @@
{OccName: a}))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:22:12-16 }))
+ (HsTok)))
[]
{Bag(LocatedA (HsBind GhcPs)):
[]}
@@ -946,6 +991,10 @@
(TokenLoc
(EpaSpan { T17544.hs:28:30 }))
(HsTok)))
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:28:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:28:7-8 })
@@ -970,6 +1019,11 @@
{OccName: a}))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:28:12-16 }))
+ (HsTok)))
[]
{Bag(LocatedA (HsBind GhcPs)):
[]}
@@ -1223,6 +1277,10 @@
(TokenLoc
(EpaSpan { T17544.hs:34:30 }))
(HsTok)))
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:34:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:34:7-8 })
@@ -1247,6 +1305,11 @@
{OccName: a}))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:34:12-16 }))
+ (HsTok)))
[]
{Bag(LocatedA (HsBind GhcPs)):
[]}
@@ -1500,6 +1563,10 @@
(TokenLoc
(EpaSpan { T17544.hs:40:30 }))
(HsTok)))
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:40:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:40:7-8 })
@@ -1524,6 +1591,11 @@
{OccName: a}))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:40:12-16 }))
+ (HsTok)))
[]
{Bag(LocatedA (HsBind GhcPs)):
[]}
@@ -1777,6 +1849,10 @@
(TokenLoc
(EpaSpan { T17544.hs:46:30 }))
(HsTok)))
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:46:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:46:7-8 })
@@ -1801,6 +1877,11 @@
{OccName: a}))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:46:12-16 }))
+ (HsTok)))
[]
{Bag(LocatedA (HsBind GhcPs)):
[]}
@@ -2054,6 +2135,10 @@
(TokenLoc
(EpaSpan { T17544.hs:52:32 }))
(HsTok)))
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:52:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T17544.hs:52:7-9 })
@@ -2078,6 +2163,11 @@
{OccName: a}))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T17544.hs:52:13-17 }))
+ (HsTok)))
[]
{Bag(LocatedA (HsBind GhcPs)):
[]}
=====================================
testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
=====================================
@@ -281,6 +281,10 @@
(NoAnnSortKey))
(VirtualBraces
(5))
+ (L
+ (TokenLoc
+ (EpaSpan { T17544_kw.hs:21:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T17544_kw.hs:21:7-9 })
@@ -305,6 +309,11 @@
{OccName: a}))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T17544_kw.hs:23:3-7 }))
+ (HsTok)))
[(L
(SrcSpanAnn (EpAnnNotUsed) { T17544_kw.hs:24:5-18 })
(ClassOpSig
=====================================
testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
=====================================
@@ -1052,6 +1052,10 @@
[]}
(VirtualBraces
(3))
+ (L
+ (TokenLoc
+ (EpaSpan { DumpRenamedAst.hs:27:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { DumpRenamedAst.hs:27:7 })
@@ -1074,6 +1078,11 @@
{Name: a})))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { DumpRenamedAst.hs:27:11-15 }))
+ (HsTok)))
[]
{Bag(LocatedA (HsBind Name)):
[]}
=====================================
testsuite/tests/parser/should_compile/DumpSemis.stderr
=====================================
@@ -1060,6 +1060,10 @@
(NoAnnSortKey))
(VirtualBraces
(3))
+ (L
+ (TokenLoc
+ (EpaSpan { DumpSemis.hs:28:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:28:7-19 })
@@ -1103,6 +1107,11 @@
{OccName: Type}))))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { DumpSemis.hs:28:40-44 }))
+ (HsTok)))
[(L
(SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:29:3-23 })
(ClassOpSig
=====================================
testsuite/tests/parser/should_compile/T20452.stderr
=====================================
@@ -248,6 +248,10 @@
(TokenLoc
(EpaSpan { T20452.hs:8:85 }))
(HsTok)))
+ (L
+ (TokenLoc
+ (EpaSpan { T20452.hs:8:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T20452.hs:8:7-12 })
@@ -403,6 +407,11 @@
{OccName: String}))))]))))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T20452.hs:8:78-82 }))
+ (HsTok)))
[]
{Bag(LocatedA (HsBind GhcPs)):
[]}
@@ -442,6 +451,10 @@
(TokenLoc
(EpaSpan { T20452.hs:9:85 }))
(HsTok)))
+ (L
+ (TokenLoc
+ (EpaSpan { T20452.hs:9:1-5 }))
+ (HsTok))
(Nothing)
(L
(SrcSpanAnn (EpAnnNotUsed) { T20452.hs:9:7-12 })
@@ -603,6 +616,11 @@
{OccName: String}))))]))))))])
(Prefix)
[]
+ (Just
+ (L
+ (TokenLoc
+ (EpaSpan { T20452.hs:9:78-82 }))
+ (HsTok)))
[]
{Bag(LocatedA (HsBind GhcPs)):
[]}
=====================================
utils/check-exact/ExactPrint.hs
=====================================
@@ -3461,9 +3461,11 @@ instance ExactPrint (TyClDecl GhcPs) where
exact (ClassDecl {tcdCExt = (an, sortKey),
tcdLayout = lo,
+ tcdTkClass = tkClass,
tcdCtxt = context, tcdLName = lclas, tcdTyVars = tyvars,
tcdFixity = fixity,
tcdFDs = fds,
+ tcdTkWhere = tkWhere,
tcdSigs = sigs, tcdMeths = methods,
tcdATs = ats, tcdATDefs = at_defs,
tcdDocs = _docs})
@@ -3475,9 +3477,11 @@ instance ExactPrint (TyClDecl GhcPs) where
an2 <- markEpAnnL an1 lidl AnnCloseC
return (ClassDecl {tcdCExt = (an2, sortKey),
tcdLayout = lo,
+ tcdTkClass = tkClass,
tcdCtxt = context', tcdLName = lclas', tcdTyVars = tyvars',
tcdFixity = fixity,
tcdFDs = fds',
+ tcdTkWhere = tkWhere,
tcdSigs = sigs, tcdMeths = methods,
tcdATs = ats, tcdATDefs = at_defs,
tcdDocs = _docs})
@@ -3502,9 +3506,11 @@ instance ExactPrint (TyClDecl GhcPs) where
at_defs' = undynamic ds
return (ClassDecl {tcdCExt = (an3, sortKey),
tcdLayout = lo,
+ tcdTkClass = tkClass,
tcdCtxt = context', tcdLName = lclas', tcdTyVars = tyvars',
tcdFixity = fixity,
tcdFDs = fds',
+ tcdTkWhere = tkWhere,
tcdSigs = sigs', tcdMeths = methods',
tcdATs = ats', tcdATDefs = at_defs',
tcdDocs = _docs})
=====================================
utils/haddock
=====================================
@@ -1 +1 @@
-Subproject commit edc72530978d8a9ec92f51d288484986ec0051e3
+Subproject commit 0fa7dc86dccd751e06845c7ac3908230df2add7f
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7515ec98a5a04603ac366c8802ac8af813a74304
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7515ec98a5a04603ac366c8802ac8af813a74304
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221204/dcde9c3c/attachment-0001.html>
More information about the ghc-commits
mailing list