From 11d6191dd81696adcab22fd72824847eae7a642e Mon Sep 17 00:00:00 2001 From: Bodigrim Date: Fri, 17 Nov 2023 23:56:27 +0000 Subject: [PATCH] Revert some stylistic changes --- Codec/Archive/Tar/Entry.hs | 1 - Codec/Archive/Tar/Pack.hs | 9 ++------- Codec/Archive/Tar/Unpack.hs | 3 --- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Codec/Archive/Tar/Entry.hs b/Codec/Archive/Tar/Entry.hs index 17de347..2bb85ca 100644 --- a/Codec/Archive/Tar/Entry.hs +++ b/Codec/Archive/Tar/Entry.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Codec.Archive.Tar.Entry diff --git a/Codec/Archive/Tar/Pack.hs b/Codec/Archive/Tar/Pack.hs index f056f37..2a7b59d 100644 --- a/Codec/Archive/Tar/Pack.hs +++ b/Codec/Archive/Tar/Pack.hs @@ -1,6 +1,3 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE TupleSections #-} -{-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiWayIf #-} ----------------------------------------------------------------------------- -- | @@ -130,12 +127,11 @@ packFileEntry filepath tarpath = do file <- openBinaryFile filepath ReadMode size <- hFileSize file content <- BS.hGetContents file - let entry tp = (simpleEntry tp (NormalFile content (fromIntegral size))) { + return (simpleEntry tarpath (NormalFile content (fromIntegral size))) { entryPermissions = if executable perms then executableFilePermissions else ordinaryFilePermissions, entryTime = mtime } - return (entry tarpath) -- | Construct a tar 'Entry' based on a local directory (but not its contents). -- @@ -147,10 +143,9 @@ packDirectoryEntry :: FilePath -- ^ Full path to find the file on the local disk -> IO Entry packDirectoryEntry filepath tarpath = do mtime <- getModTime filepath - let dEntry tp = (directoryEntry tp) { + return (directoryEntry tarpath) { entryTime = mtime } - return (dEntry tarpath) -- | Construct a tar 'Entry' based on a local symlink. -- diff --git a/Codec/Archive/Tar/Unpack.hs b/Codec/Archive/Tar/Unpack.hs index c35961e..a9072cd 100644 --- a/Codec/Archive/Tar/Unpack.hs +++ b/Codec/Archive/Tar/Unpack.hs @@ -1,6 +1,3 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE ViewPatterns #-} -{-# LANGUAGE LambdaCase #-} ----------------------------------------------------------------------------- -- | -- Module : Codec.Archive.Tar