[commit: dph] : Fix warnings and wibbles. (8c96baa)
Ben Lippmeier
benl at ouroborus.net
Thu May 12 15:42:32 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/dph
On branch :
http://hackage.haskell.org/trac/ghc/changeset/8c96baa08133d4b17c8feed81ba2696ee79c58b7
>---------------------------------------------------------------
commit 8c96baa08133d4b17c8feed81ba2696ee79c58b7
Author: Ben Lippmeier <benl at ouroborus.net>
Date: Fri May 6 15:31:04 2011 +1000
Fix warnings and wibbles.
>---------------------------------------------------------------
dph-common/Data/Array/Parallel/PArray/Base.hs | 8 +++-----
dph-common/Data/Array/Parallel/PArray/PData.hs | 1 -
.../Data/Array/Parallel/PArray/PReprInstances.hs | 14 ++++++++++++--
dph-common/Data/Array/Parallel/PArray/Scalar.hs | 1 -
4 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/dph-common/Data/Array/Parallel/PArray/Base.hs b/dph-common/Data/Array/Parallel/PArray/Base.hs
index 4292bcc..7643311 100644
--- a/dph-common/Data/Array/Parallel/PArray/Base.hs
+++ b/dph-common/Data/Array/Parallel/PArray/Base.hs
@@ -1,12 +1,10 @@
-
{-# LANGUAGE CPP, FlexibleContexts #-}
#include "fusion-phases.h"
-- | Definition of the PArray type, and functions that work on it. The PArray
--- type is a PData with an array length, and as such the functions we export
--- from this module are just wrappers for the PD functions from
--- Data.Array.Parallel.PArray.PRepr.
+-- type is a PData with an array length. The functions we export from this
+-- module are just wrappers for the PD functions from Data.Array.Parallel.PArray.PRepr.
--
-- TODO: Check inconsistent use of INLINE pragmas.
-- Most have INLINE_PA, but bpermutePD and nfPD have plain INLINE
@@ -79,7 +77,7 @@ replicatePA# n# x
replicatelPA# :: PA a => U.Segd -> PArray a -> PArray a
{-# INLINE_PA replicatelPA# #-}
-replicatelPA# segd (PArray n# xs)
+replicatelPA# segd (PArray _ xs)
= PArray (elementsSegd# segd) (replicatelPD segd xs)
repeatPA# :: PA a => Int# -> PArray a -> PArray a
diff --git a/dph-common/Data/Array/Parallel/PArray/PData.hs b/dph-common/Data/Array/Parallel/PArray/PData.hs
index 6f0fdb5..6861492 100644
--- a/dph-common/Data/Array/Parallel/PArray/PData.hs
+++ b/dph-common/Data/Array/Parallel/PArray/PData.hs
@@ -1,4 +1,3 @@
-
-- | Defines the family of types that store parallel array data,
-- and the operators we can apply to it.
--
diff --git a/dph-common/Data/Array/Parallel/PArray/PReprInstances.hs b/dph-common/Data/Array/Parallel/PArray/PReprInstances.hs
index ef5d386..6935269 100644
--- a/dph-common/Data/Array/Parallel/PArray/PReprInstances.hs
+++ b/dph-common/Data/Array/Parallel/PArray/PReprInstances.hs
@@ -1,17 +1,27 @@
{-# LANGUAGE CPP #-}
+{-# OPTIONS -fno-warn-orphans #-}
#include "fusion-phases.h"
-- | Instances for the PRepr class.
+--
-- For primitive types these are all trivial, as we represent an array of
--- of Ints just as an array of Ints.
+-- Ints just as an array of Ints.
+--
+-- For algebraic data types defined in the source program, the vectoriser
+-- creates the appropriate PRepr instances for those types.
+--
+-- Note that polymorphic container types like tuples and arrays use the
+-- `Wrap` constructor so we only need to convert one layer of the structure
+-- to the generic representation at a time.
+-- See "Data.Array.Parallel.PArray.Types" for details.
--
module Data.Array.Parallel.PArray.PReprInstances
where
import Data.Array.Parallel.PArray.PRepr
+import Data.Array.Parallel.PArray.PData
import Data.Array.Parallel.PArray.Base
import Data.Array.Parallel.Lifted.Repr
-import Data.Array.Parallel.Lifted.Unboxed ( elementsSegd# )
import qualified Data.Array.Parallel.Unlifted as U
import GHC.Word ( Word8 )
diff --git a/dph-common/Data/Array/Parallel/PArray/Scalar.hs b/dph-common/Data/Array/Parallel/PArray/Scalar.hs
index e5ba7b6..83d3780 100644
--- a/dph-common/Data/Array/Parallel/PArray/Scalar.hs
+++ b/dph-common/Data/Array/Parallel/PArray/Scalar.hs
@@ -1,4 +1,3 @@
-
-- | Defines the class of scalar element types, as well as the
-- PData instances for these types.
--
More information about the Cvs-libraries
mailing list