Skip to content
Snippets Groups Projects
Verified Commit 122c54b5 authored by Julian Ospald's avatar Julian Ospald :tea:
Browse files

Refactor

parent b9d7d7d0
Branches
Tags
1 merge request!28Cabal install 3.4.0.0 rc1
......@@ -376,17 +376,16 @@ unpackToDir dest av = do
#if defined(TAR)
let untar :: MonadIO m => BL.ByteString -> Excepts '[] m ()
untar = liftIO . Tar.unpack (toFilePath dest) . Tar.read
rf :: MonadIO m => Path Abs -> Excepts '[] m BL.ByteString
rf = liftIO . readFile
#else
let untar :: MonadIO m => BL.ByteString -> Excepts '[ArchiveResult] m ()
untar = lEM . liftIO . runArchiveM . unpackToDirLazy (T.unpack . decUTF8Safe . toFilePath $ dest)
#endif
#if defined(TAR)
rf :: MonadIO m => Path Abs -> Excepts '[] m BL.ByteString
#else
rf :: MonadIO m => Path Abs -> Excepts '[ArchiveResult] m BL.ByteString
#endif
rf = liftIO . readFile
#endif
-- extract, depending on file extension
if
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment