File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
lib/Language/Haskell/Stylish/Step Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ import Language.Haskell.Stylish.Ordering
37
37
import Language.Haskell.Stylish.Printer
38
38
import Language.Haskell.Stylish.Step
39
39
import Language.Haskell.Stylish.Util
40
-
41
40
--------------------------------------------------------------------------------
42
41
data Indent
43
42
= SameLine
@@ -140,7 +139,10 @@ putDataDecl cfg@Config {..} decl = do
140
139
constructorComments = commentGroups
141
140
(GHC. srcSpanToRealSrcSpan . GHC. getLocA)
142
141
(getConDecls defn)
143
- (dataComments decl)
142
+ (removeCommentsBeforeDataDecl $ dataComments decl)
143
+
144
+ removeCommentsBeforeDataDecl = filter
145
+ (\ comment -> GHC. anchor (GHC. getLoc comment) >= dataLoc decl)
144
146
145
147
onelineEnum =
146
148
isEnum decl && not cBreakEnums &&
You can’t perform that action at this time.
0 commit comments