summaryrefslogtreecommitdiff
path: root/Utility/TempFile.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utility/TempFile.hs')
-rw-r--r--Utility/TempFile.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Utility/TempFile.hs b/Utility/TempFile.hs
index 3887b422b..469d52e8c 100644
--- a/Utility/TempFile.hs
+++ b/Utility/TempFile.hs
@@ -26,8 +26,10 @@ viaTmp a file content = do
a tmpfile content
renameFile tmpfile file
+type Template = String
+
{- Runs an action with a temp file, then removes the file. -}
-withTempFile :: String -> (FilePath -> Handle -> IO a) -> IO a
+withTempFile :: Template -> (FilePath -> Handle -> IO a) -> IO a
withTempFile template a = bracket create remove use
where
create = do