[commit: dph] master: Document the awful fake dependency hack in Data.Array.Parallel (15e2528)
Ben Lippmeier
benl at ouroborus.net
Thu May 12 15:42:58 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/dph
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/15e25288c247869c77d902e01810306a8cb5cc02
>---------------------------------------------------------------
commit 15e25288c247869c77d902e01810306a8cb5cc02
Author: Ben Lippmeier <benl at ouroborus.net>
Date: Thu May 12 20:17:52 2011 +1000
Document the awful fake dependency hack in Data.Array.Parallel
>---------------------------------------------------------------
dph-common/Data/Array/Parallel.hs | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/dph-common/Data/Array/Parallel.hs b/dph-common/Data/Array/Parallel.hs
index d201f7a..e849551 100644
--- a/dph-common/Data/Array/Parallel.hs
+++ b/dph-common/Data/Array/Parallel.hs
@@ -53,12 +53,32 @@ module Data.Array.Parallel (
import Prelude hiding (undefined)
import GHC.PArr -- only has the definition of [::] left
--- fake dependency to satisfy built-in iface loading in the vectoriser
-import Data.Array.Parallel.Prelude.Base.Tuple ()
-
import Data.Array.Parallel.Lifted
import Data.Array.Parallel.Lifted.Combinators
+
+-------------------------------------------------------------------------------
+-- FAKE DEPENDENCIES
+-- These imports are an atrocious hack to get around a race in the GHC build
+-- system. The race happens when we try to build Haddock docs for the dph-par
+-- and dph-seq packages. As these are really aliases for dph-common, all the
+-- dph-common modules need to be loaded, otherwise desugaring fails.
+--
+-- Adding these dependencies fixes the problem, as they ensure that the required
+-- dph-common modules are loaded before we try to vectorise THIS MODULE. If you
+-- take them out, then mae sure GHC still validates with >= 2 threads. Without
+-- the dependencies it'll still work for 1 thread, but die with more than that.
+--
+-- Note that following modules are exactly the ones that don't import THIS MODULE
+-- by themselves.
+--
+import Data.Array.Parallel.Prelude.Base.Bool ()
+import Data.Array.Parallel.Prelude.Base.Tuple ()
+--
+-- ... the horror, the horror ...
+-------------------------------------------------------------------------------
+
+
infixl 9 !:
infixr 5 +:+
More information about the Cvs-libraries
mailing list