mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-26 06:01:57 +01:00
Exception safety
This commit is contained in:
parent
c880ef6060
commit
c7b2d2303f
@ -1,11 +1,12 @@
|
|||||||
{-# LANGUAGE DeriveDataTypeable #-}
|
{-# LANGUAGE DeriveDataTypeable #-}
|
||||||
{-# LANGUAGE RecordWildCards #-}
|
{-# LANGUAGE RecordWildCards #-}
|
||||||
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
module Stackage.Test
|
module Stackage.Test
|
||||||
( runTestSuites
|
( runTestSuites
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import qualified Control.Concurrent as C
|
import qualified Control.Concurrent as C
|
||||||
import Control.Exception (Exception, SomeException, handle, throwIO)
|
import Control.Exception (Exception, SomeException, handle, throwIO, IOException)
|
||||||
import Control.Monad (replicateM, unless, when, forM_)
|
import Control.Monad (replicateM, unless, when, forM_)
|
||||||
import qualified Data.Map as Map
|
import qualified Data.Map as Map
|
||||||
import qualified Data.Set as Set
|
import qualified Data.Set as Set
|
||||||
@ -149,7 +150,7 @@ runTestSuite cabalVersion settings testdir docdir (packageName, SelectedPackageI
|
|||||||
, "--html-location=../$pkg-$version/"
|
, "--html-location=../$pkg-$version/"
|
||||||
] dir
|
] dir
|
||||||
let PackageName packageName' = packageName
|
let PackageName packageName' = packageName
|
||||||
renameDirectory
|
handle (\(_ :: IOException) -> return ()) $ renameDirectory
|
||||||
(dir </> "dist" </> "doc" </> "html" </> packageName')
|
(dir </> "dist" </> "doc" </> "html" </> packageName')
|
||||||
(docdir </> package)
|
(docdir </> package)
|
||||||
return True
|
return True
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user