Refactoring: Replace when (not ...) with unless in ErrUtils
authorMatthew Pickering <matthewtpickering@gmail.com>
Sat, 22 Oct 2016 23:22:30 +0000 (00:22 +0100)
committerMatthew Pickering <matthewtpickering@gmail.com>
Sat, 22 Oct 2016 23:23:01 +0000 (00:23 +0100)
[skip ci]

compiler/main/ErrUtils.hs

index 9a4c7fc..41150a6 100644 (file)
@@ -356,7 +356,7 @@ dumpSDoc dflags print_unqual flag hdr doc
                         gd <- readIORef gdref
                         let append = Set.member fileName gd
                             mode = if append then AppendMode else WriteMode
-                        when (not append) $
+                        unless append $
                             writeIORef gdref (Set.insert fileName gd)
                         createDirectoryIfMissing True (takeDirectory fileName)
                         handle <- openFile fileName mode