diff --git a/.hlint.yaml b/.hlint.yaml index d72e3946..c14042b2 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -31,4 +31,3 @@ - ignore: {name: "Use maybe"} # 1 hint - ignore: {name: "Use newtype instead of data"} # 1 hint - ignore: {name: "Use replicate"} # 1 hint -- ignore: {name: "Use unless"} # 1 hint diff --git a/proto-lens-setup/src/Data/ProtoLens/Setup.hs b/proto-lens-setup/src/Data/ProtoLens/Setup.hs index 7c7815c7..89fa022c 100644 --- a/proto-lens-setup/src/Data/ProtoLens/Setup.hs +++ b/proto-lens-setup/src/Data/ProtoLens/Setup.hs @@ -24,7 +24,7 @@ module Data.ProtoLens.Setup , generateProtos ) where -import Control.Monad (filterM, forM_, when) +import Control.Monad (filterM, forM_, unless, when) import qualified Data.ByteString as BS import qualified Data.Map as Map import Data.Maybe (maybeToList) @@ -274,7 +274,7 @@ copyIfDifferent sourcePath targetPath = do targetContents <- BS.readFile targetPath return (sourceContents == targetContents) -- Do the move if necessary. - when (not identical) $ do + unless identical $ do createDirectoryIfMissing True (takeDirectory targetPath) copyFile sourcePath targetPath