Skip to content

Commit

Permalink
Fix makeDeltaAst for RecordPatSynField and FieldOcc
Browse files Browse the repository at this point in the history
  • Loading branch information
alanz committed Apr 7, 2024
1 parent a339c9f commit f8ebf6c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Language/Haskell/GHC/ExactPrint/ExactPrint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2572,8 +2572,9 @@ instance ExactPrint (PatSynBind GhcPs GhcPs) where
instance ExactPrint (RecordPatSynField GhcPs) where
getAnnotationEntry = const NoEntryVal
setAnnotationAnchor a _ _ _ = a
exact r@(RecordPatSynField { recordPatSynField = v }) = markAnnotated v
>> return r
exact (RecordPatSynField f v) = do
f' <- markAnnotated f
return (RecordPatSynField f' v)

-- ---------------------------------------------------------------------

Expand Down Expand Up @@ -4520,7 +4521,9 @@ instance ExactPrint (ConDeclField GhcPs) where
instance ExactPrint (FieldOcc GhcPs) where
getAnnotationEntry = const NoEntryVal
setAnnotationAnchor a _ _ _ = a
exact f@(FieldOcc _ n) = markAnnotated n >> return f
exact (FieldOcc x n) = do
n' <- markAnnotated n
return (FieldOcc x n')

-- ---------------------------------------------------------------------

Expand Down

0 comments on commit f8ebf6c

Please sign in to comment.