@@ -50,10 +50,15 @@ p_pat = \case
5050 inci $ velt' (located' p_pat <$> xs)
5151 RecCon (HsRecFields fields dotdot) -> do
5252 p_rdrName pat
53− case dotdot of
54− Nothing -> txt " {..}"
55− Just _ -> do
56− braces $ velt (withSep comma (located' p_hsRecField) fields)
53+ breakpoint
54+ let f = \case
55+ Nothing -> txt ".."
56+ Just x -> located x p_hsRecField
57+ inci . braces . velt . withSep comma f $ case dotdot of
58+ Nothing ->
59+ Just <$> fields
60+ Just n -> do
61+ (Just <$> take n fields) ++ [Nothing]
5762 InfixCon x y -> do
5863 located x p_pat
5964 space
@@ -71,6 +76,10 @@ p_pat = \case
7176 XPat NoExt -> notImplemented "XPat"
7277
7378p_hsRecField :: HsRecField' (FieldOcc GhcPs) (LPat GhcPs) -> R ()
74−p_hsRecField HsRecField {..} =
79+p_hsRecField HsRecField {..} = do
7580 located hsRecFieldLbl $ \x ->
7681 p_rdrName (rdrNameFieldOcc x)
82+ unless hsRecPun $ do
83+ txt " ="
84+ breakpoint
85+ inci (located hsRecFieldArg p_pat)