Skip to content

Commit 937efe7

Browse files
committed
Restore some cases in Outline
1 parent 61c657e commit 937efe7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ghcide/src/Development/IDE/LSP/Outline.hs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,20 +145,26 @@ documentSymbolForDecl (L (locA -> (RealSrcSpan l _)) (InstD _ ClsInstD { cid_ins
145145
= Just (defDocumentSymbol l :: DocumentSymbol) { _name = pprText cid_poly_ty
146146
, _kind = SkInterface
147147
}
148-
#if !MIN_VERSION_ghc(9,2,0)
148+
#if MIN_VERSION_ghc(9,2,0)
149+
documentSymbolForDecl (L (locA -> (RealSrcSpan l _)) (InstD _ DataFamInstD { dfid_inst = DataFamInstDecl FamEqn { feqn_tycon, feqn_pats } }))
150+
#else
149151
documentSymbolForDecl (L (RealSrcSpan l _) (InstD _ DataFamInstD { dfid_inst = DataFamInstDecl HsIB { hsib_body = FamEqn { feqn_tycon, feqn_pats } } }))
152+
#endif
150153
= Just (defDocumentSymbol l :: DocumentSymbol)
151154
{ _name = showRdrName (unLoc feqn_tycon) <> " " <> T.unwords
152155
(map pprText feqn_pats)
153156
, _kind = SkInterface
154157
}
158+
#if MIN_VERSION_ghc(9,2,0)
159+
documentSymbolForDecl (L (locA -> (RealSrcSpan l _)) (InstD _ TyFamInstD { tfid_inst = TyFamInstDecl _ FamEqn { feqn_tycon, feqn_pats } }))
160+
#else
155161
documentSymbolForDecl (L (RealSrcSpan l _) (InstD _ TyFamInstD { tfid_inst = TyFamInstDecl HsIB { hsib_body = FamEqn { feqn_tycon, feqn_pats } } }))
162+
#endif
156163
= Just (defDocumentSymbol l :: DocumentSymbol)
157164
{ _name = showRdrName (unLoc feqn_tycon) <> " " <> T.unwords
158165
(map pprText feqn_pats)
159166
, _kind = SkInterface
160167
}
161-
#endif
162168
documentSymbolForDecl (L (locA -> (RealSrcSpan l _)) (DerivD _ DerivDecl { deriv_type })) =
163169
gfindtype deriv_type <&> \(L (_ :: SrcSpan) name) ->
164170
(defDocumentSymbol l :: DocumentSymbol) { _name = pprText @(HsType GhcPs)

0 commit comments

Comments
 (0)