@@ -164,7 +164,7 @@ testPkg fp
164164 do m_ist <- inPkgDir pkgdesc $
165165 do make (makefile pkgdesc)
166166 -- Get a temporary file to save the tests' source in
167− (tmpn, tmph) <- tempIdr
167+ (tmpn, tmph) <- tempfile ".idr"
168168 hPutStrLn tmph $
169169 "module Test_______\n" ++
170170 concat ["import " ++ show m ++ "\n"
@@ -175,7 +175,7 @@ testPkg fp
175175 concat [show t ++ "\n "
176176 | t <- idris_tests pkgdesc]
177177 hClose tmph
178− (tmpn', tmph') <- tempfile
178+ (tmpn', tmph') <- tempfile ""
179179 hClose tmph'
180180 m_ist <- idris (Filename tmpn : NoREPL : Verbose : Output tmpn' : idris_opts pkgdesc)
181181 rawSystem tmpn' []
@@ -187,9 +187,6 @@ testPkg fp
187187 case errSpan ist of
188188 Just _ -> exitWith (ExitFailure 1)
189189 _ -> return ()
190− where tempIdr :: IO (FilePath, Handle)
191− tempIdr = do dir <- getTemporaryDirectory
192− openTempFile (normalise dir) "idristests.idr"
193190
194191-- | Install package
195192installPkg :: PkgDesc -> IO ()
@@ -214,7 +211,7 @@ testLib :: Bool -> String -> String -> IO Bool
214211testLib warn p f
215212 = do d <- getDataDir
216213 gcc <- getCC
217− (tmpf, tmph) <- tempfile
214+ (tmpf, tmph) <- tempfile ""
218215 hClose tmph
219216 let libtest = d </> "rts" </> "libtest.c"
220217 e <- rawSystem gcc [libtest, "-l" ++ f, "-o", tmpf]