Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
toku-sa-n committed Sep 7, 2024
1 parent 720a193 commit 4abb565
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/HIndent/Pretty/NodeComments.hs
Original file line number Diff line number Diff line change
Expand Up @@ -455,15 +455,17 @@ instance CommentExtraction (HsLocalBindsLR GhcPs GhcPs) where
instance CommentExtraction (HsValBindsLR GhcPs GhcPs) where
nodeComments ValBinds {} = emptyNodeComments
nodeComments XValBindsLR {} = notUsedInParsedStage
#if MIN_VERSION_ghc_lib_parser(9, 10, 1)

instance CommentExtraction (HsTupArg GhcPs) where
nodeComments Present {} = emptyNodeComments
nodeComments (Missing x) = nodeComments x
nodeComments = nodeCommentsHsTupArg

nodeCommentsHsTupArg :: HsTupArg GhcPs -> NodeComments
#if MIN_VERSION_ghc_lib_parser(9, 10, 1)
nodeCommentsHsTupArg Present {} = emptyNodeComments
#else
instance CommentExtraction (HsTupArg GhcPs) where
nodeComments (Present x _) = nodeComments x
nodeComments (Missing x) = nodeComments x
nodeCommentsHsTupArg (Present x _) = nodeComments x
#endif
nodeCommentsHsTupArg (Missing x) = nodeComments x
#if MIN_VERSION_ghc_lib_parser(9, 4, 1)
instance CommentExtraction RecConField where
nodeComments (RecConField x) = nodeComments x
Expand Down

0 comments on commit 4abb565

Please sign in to comment.