I’m trying to create a tar file from a directory’s contents using Codec.Archive.Tar, but I also want to clean up the directory once the tar file has been created. Here’s a small example which demonstrates my issue: When I call the function listFile e.g. from within ghci, I get back which I’m guessing is caused by the tar file being