summaryrefslogtreecommitdiff
path: root/compiler/vectorise
diff options
context:
space:
mode:
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>2012-07-28 21:48:34 +1000
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>2012-07-28 22:11:00 +1000
commit873f7b28ab694167a685e763aac6eb47d18a38c1 (patch)
tree7f1ed250cc176cd4446569e57d091d95a0556170 /compiler/vectorise
parent24387e60bdeecd6828ea5b9741933b2bbcc24f20 (diff)
downloadhaskell-873f7b28ab694167a685e763aac6eb47d18a38c1.tar.gz
Fix dfun unfolding of PA instances generated by the vectoriser
Diffstat (limited to 'compiler/vectorise')
-rw-r--r--compiler/vectorise/Vectorise/Generic/PADict.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/vectorise/Vectorise/Generic/PADict.hs b/compiler/vectorise/Vectorise/Generic/PADict.hs
index 20aab59182..96e0dbc225 100644
--- a/compiler/vectorise/Vectorise/Generic/PADict.hs
+++ b/compiler/vectorise/Vectorise/Generic/PADict.hs
@@ -24,7 +24,7 @@ import FastString
-- |Build the PA dictionary function for some type and hoist it to top level.
--
--- The PA dictionary holds fns that convert values to and from their vectorised representations.
+-- The PA dictionary holds fns that convert values to and from their vectorised representations.
--
-- @Recall the definition:
-- class PR (PRepr a) => PA a where
@@ -32,6 +32,8 @@ import FastString
-- fromPRepr :: PRepr a -> a
-- toArrPRepr :: PData a -> PData (PRepr a)
-- fromArrPRepr :: PData (PRepr a) -> PData a
+-- toArrPReprs :: PDatas a -> PDatas (PRepr a)
+-- fromArrPReprs :: PDatas (PRepr a) -> PDatas a
--
-- Example:
-- df :: forall a. PR (PRepr a) -> PA a -> PA (T a)
@@ -93,7 +95,7 @@ buildPADict vect_tc prepr_ax pdata_tc pdatas_tc repr
; raw_dfun <- newExportedVar dfun_name dfun_ty
; let dfun_unf = mkDFunUnfolding dfun_ty $
map (const $ DFunLamArg 0) super_args
- -- ++ map DFunConstArg super_consts
+ ++ map DFunPolyArg super_consts
++ map (DFunPolyArg . Var) method_ids
dfun = raw_dfun `setIdUnfolding` dfun_unf
`setInlinePragma` dfunInlinePragma