Skip to content

Commit

Permalink
Revert some stylistic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodigrim committed Nov 18, 2023
1 parent 6954d50 commit 303c0f5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion Codec/Archive/Tar/Entry.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Codec.Archive.Tar.Entry
Expand Down
9 changes: 2 additions & 7 deletions Codec/Archive/Tar/Pack.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
-----------------------------------------------------------------------------
-- |
Expand Down Expand Up @@ -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).
--
Expand All @@ -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.
--
Expand Down
3 changes: 1 addition & 2 deletions Codec/Archive/Tar/Unpack.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ViewPatterns #-}
-----------------------------------------------------------------------------
-- |
-- Module : Codec.Archive.Tar
Expand Down

0 comments on commit 303c0f5

Please sign in to comment.