From b616704162c54e84def11f4bd2f4dc43d47643f3 Mon Sep 17 00:00:00 2001 From: Joshua Clayton Date: Sun, 18 Mar 2018 22:39:39 -0400 Subject: [PATCH] Apply recommendations from hlint What? ===== This updates the codebase to switch from data to newtype in certain cases. --- src/Unused/Cache/DirectoryFingerprint.hs | 2 +- src/Unused/Types.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Unused/Cache/DirectoryFingerprint.hs b/src/Unused/Cache/DirectoryFingerprint.hs index d0b61a8..4c8799f 100644 --- a/src/Unused/Cache/DirectoryFingerprint.hs +++ b/src/Unused/Cache/DirectoryFingerprint.hs @@ -17,7 +17,7 @@ newtype MD5ExecutablePath = MD5ExecutablePath type MD5Config = ReaderT MD5ExecutablePath IO -data FingerprintOutcome = +newtype FingerprintOutcome = MD5ExecutableNotFound [String] sha :: IO (Either FingerprintOutcome String) diff --git a/src/Unused/Types.hs b/src/Unused/Types.hs index 6985d39..9b93916 100644 --- a/src/Unused/Types.hs +++ b/src/Unused/Types.hs @@ -70,11 +70,11 @@ data Removal = Removal , rReason :: String } deriving (Eq, Show) -data GitContext = GitContext +newtype GitContext = GitContext { gcCommits :: [GitCommit] } deriving (Eq, Show) -data GitCommit = GitCommit +newtype GitCommit = GitCommit { gcSha :: String } deriving (Eq, Show)