Skip to content

Commit de1b0e8

Browse files
committed
instance ASTElement RdrName
1 parent 7d605b2 commit de1b0e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ghcide/src/Development/IDE/GHC/ExactPrint.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ import Language.Haskell.LSP.Types
5454
import Language.Haskell.LSP.Types.Capabilities (ClientCapabilities)
5555
import Outputable (Outputable, ppr, showSDoc)
5656
import Retrie.ExactPrint hiding (parseDecl, parseExpr, parsePattern, parseType)
57+
import Parser (parseIdentifier)
5758
#if __GLASGOW_HASKELL__ == 808
5859
import Control.Arrow
5960
#endif
@@ -309,6 +310,10 @@ instance p ~ GhcPs => ASTElement (HsDecl p) where
309310
parseAST = parseDecl
310311
maybeParensAST = id
311312

313+
instance ASTElement RdrName where
314+
parseAST df fp = parseWith df fp parseIdentifier
315+
maybeParensAST = id
316+
312317
------------------------------------------------------------------------------
313318

314319
-- | Dark magic I stole from retrie. No idea what it does.

0 commit comments

Comments
 (0)