[commit: ghc] master: Refactoring: Replace when (not ...) with unless in ErrUtils (a6bcf87)

git at git.haskell.org git at git.haskell.org
Sat Oct 22 23:30:23 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a6bcf8783ff758a82d003ea8f669d7216695fa59/ghc

>---------------------------------------------------------------

commit a6bcf8783ff758a82d003ea8f669d7216695fa59
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Sun Oct 23 00:22:30 2016 +0100

    Refactoring: Replace when (not ...) with unless in ErrUtils
    
    [skip ci]


>---------------------------------------------------------------

a6bcf8783ff758a82d003ea8f669d7216695fa59
 compiler/main/ErrUtils.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/main/ErrUtils.hs b/compiler/main/ErrUtils.hs
index 9a4c7fc..41150a6 100644
--- a/compiler/main/ErrUtils.hs
+++ b/compiler/main/ErrUtils.hs
@@ -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



More information about the ghc-commits mailing list