[commit: nofib] master: Several fixes to work with ghc-head (cf032a2)
git at git.haskell.org
git at git.haskell.org
Sat Jun 16 17:29:29 UTC 2018
Repository : ssh://git@git.haskell.org/nofib
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/cf032a225ce9e896f6a0ecadc6fd09969ade6249/nofib
>---------------------------------------------------------------
commit cf032a225ce9e896f6a0ecadc6fd09969ade6249
Author: Douglas Wilson <douglas.wilson at gmail.com>
Date: Sat Jun 16 12:37:03 2018 -0400
Several fixes to work with ghc-head
Reviewers: O26 nofib, michalt
Reviewed By: O26 nofib, michalt
Subscribers: michalt
Differential Revision: https://phabricator.haskell.org/D4391
>---------------------------------------------------------------
cf032a225ce9e896f6a0ecadc6fd09969ade6249
gc/hash/HashTable.hs | 2 +-
parallel/minimax/Tree.hs | 3 +--
smp/threads006/Main.hs | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/gc/hash/HashTable.hs b/gc/hash/HashTable.hs
index 84fc85c..97ebd0b 100644
--- a/gc/hash/HashTable.hs
+++ b/gc/hash/HashTable.hs
@@ -37,7 +37,7 @@ module HashTable
) where
#ifdef __GLASGOW_HASKELL__
-import GHC.Base
+import GHC.Base hiding (mapM)
#else
import Prelude hiding ( lookup )
#endif
diff --git a/parallel/minimax/Tree.hs b/parallel/minimax/Tree.hs
index 3483868..88e1631 100644
--- a/parallel/minimax/Tree.hs
+++ b/parallel/minimax/Tree.hs
@@ -18,7 +18,7 @@ mapTree f (Branch a l)
= fa `par` Branch fa (map (mapTree f) l `using` myParList)
where fa = f a
-#else {- SEQ -}
+#else /* SEQ */
mapTree :: (a -> b) -> (Tree a) -> (Tree b)
mapTree f (Branch a l) = Branch (f a) (map (mapTree f) l)
@@ -38,4 +38,3 @@ parTree n (Branch a xs) = a `par` mySeqList (map (parTree (n-1)) xs)
prune :: Int -> (Tree a) -> (Tree a)
prune 0 (Branch a l) = Branch a []
prune n (Branch a l) = Branch a (map (prune (n-1)) l)
-
diff --git a/smp/threads006/Main.hs b/smp/threads006/Main.hs
index 42a74d9..11d7505 100644
--- a/smp/threads006/Main.hs
+++ b/smp/threads006/Main.hs
@@ -59,7 +59,7 @@ main :: IO ()
main = do
hSetBuffering stdout NoBuffering
[nthreads] <- fmap (map read) getArgs
- tids <- replicateM nthreads . mask $ \_ -> forkIO $ return ()
+ tids <- replicateM nthreads . mask_ $ forkIO $ return ()
m <- newEmptyMVar
-- do it in a subthread to avoid bound-thread overhead
forkIO $ do mapM_ killThread tids; putMVar m ()
More information about the ghc-commits
mailing list