Skip to content

Commit f13cd3e

Browse files
committed
Don't print "Warnings:" unless there are warnings
1 parent 918997a commit f13cd3e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

psc-publish/ErrorsWarnings.hs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,11 @@ renderWarnings =
256256
where
257257
collectWarnings patterns warns =
258258
let boxes = mapMaybe (collectWarnings' warns) patterns
259-
in vcat
260-
[ para "Warnings:"
261-
, indented (vcat (intersperse spacer boxes))
262-
]
259+
result = vcat
260+
[ para "Warnings:"
261+
, indented (vcat (intersperse spacer boxes))
262+
]
263+
in if null boxes then nullBox else result
263264

264265
getResolutionNotVersion (ResolutionNotVersion n) = Just n
265266
getResolutionNotVersion _ = Nothing

0 commit comments

Comments
 (0)