From f8ebf6cd4c8588eeaed9240e30d367a9be410b62 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sun, 7 Apr 2024 20:46:57 +0100 Subject: [PATCH] Fix makeDeltaAst for RecordPatSynField and FieldOcc --- src/Language/Haskell/GHC/ExactPrint/ExactPrint.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Language/Haskell/GHC/ExactPrint/ExactPrint.hs b/src/Language/Haskell/GHC/ExactPrint/ExactPrint.hs index 03d48ddb..822b2864 100644 --- a/src/Language/Haskell/GHC/ExactPrint/ExactPrint.hs +++ b/src/Language/Haskell/GHC/ExactPrint/ExactPrint.hs @@ -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) -- --------------------------------------------------------------------- @@ -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') -- ---------------------------------------------------------------------