@@ -67,7 +67,9 @@ p_classDecl ctx name tvars fixity fdeps csigs cdefs cats catdefs = do
67 unless (null allDecls) $ do
67 unless (null allDecls) $ do
68 txt " where"
68 txt " where"
69 breakpoint -- Ensure whitespace is added after where clause.
69 breakpoint -- Ensure whitespace is added after where clause.
70− breakpoint' -- Add newline before first declaration.
70+ -- Add newline before first declaration if the body contains separate
72+ when (hasSeparatedDecls $ map unLoc allDecls) breakpoint'
71 inci (p_hsDecls Associated allDecls)
73 inci (p_hsDecls Associated allDecls)
73p_classContext :: LHsContext GhcPs -> R ()
75p_classContext :: LHsContext GhcPs -> R ()