@@ -124,18 +124,19 @@ p_conDecl = \case
124124 p_hsType (unLoc con_res_ty)
125125 ConDeclH98 {..} -> do
126126 mapM_ (p_hsDocString Pipe True) con_doc
127− let conDeclSpn =
128− [getLoc con_name]
129− <> [getLoc con_forall]
127+ let conDeclWithContextSpn =
128+ [getLoc con_forall]
130129 <> fmap getLoc con_ex_tvs
131130 <> maybeToList (fmap getLoc con_mb_cxt)
132− <> conArgsSpans con_args
133− switchLayout conDeclSpn $ do
131+ <> conDeclSpn
132+ conDeclSpn =
133+ getLoc con_name : conArgsSpans con_args
134+ switchLayout conDeclWithContextSpn $ do
134135 when (unLoc con_forall) $ do
135136 p_forallBndrs ForallInvis p_hsTyVarBndr con_ex_tvs
136137 breakpoint
137138 forM_ con_mb_cxt p_lhsContext
138− case con_args of
139+ switchLayout conDeclSpn $ case con_args of
139140 PrefixCon xs -> do
140141 p_rdrName con_name
141142 unless (null xs) breakpoint