diff --git a/Control/Concurrent/Async/Internal.hs b/Control/Concurrent/Async/Internal.hs index fe65c90..9ad660f 100644 --- a/Control/Concurrent/Async/Internal.hs +++ b/Control/Concurrent/Async/Internal.hs @@ -57,6 +57,10 @@ import GHC.Exts import GHC.IO hiding (finally, onException) import GHC.Conc (ThreadId(..)) +#if defined(__MHS__) +import Data.Traversable +#endif + #ifdef DEBUG_AUTO_LABEL import qualified GHC.Stack #endif diff --git a/Control/Concurrent/Async/Warden.hs b/Control/Concurrent/Async/Warden.hs index ec259be..a3b19a5 100644 --- a/Control/Concurrent/Async/Warden.hs +++ b/Control/Concurrent/Async/Warden.hs @@ -5,7 +5,7 @@ This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. -} - +{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -27,11 +27,17 @@ import Control.Concurrent.Async (Async) import qualified Control.Concurrent.Async as Async import Control.Concurrent.MVar import Control.Exception -import Control.Monad import Data.HashSet (HashSet) import qualified Data.HashSet as HashSet import System.IO (fixIO) +#if defined(__MHS__) +import Prelude hiding(mapM_) +import Control.Monad hiding(mapM_) +import Data.Foldable(mapM_) +#else +import Control.Monad +#endif -- | A 'Warden' is an owner of 'Async's which cancels them on 'shutdown'. --