This BIG PATCH contains most of the work for the New Coercion Representation
[ghc-hetmet.git] / compiler / vectorise / Vectorise / Builtins / Base.hs
index 884224e..165dbda 100644 (file)
@@ -33,7 +33,6 @@ import TysWiredIn
 import Type
 import TyCon
 import DataCon
-import Var
 import Outputable
 import Data.Array
 
@@ -61,9 +60,12 @@ data Builtins
         , parrayTyCon      :: TyCon                    -- ^ PArray
         , parrayDataCon    :: DataCon                  -- ^ PArray
         , pdataTyCon       :: TyCon                    -- ^ PData
+        , paClass          :: Class                     -- ^ PA
         , paTyCon          :: TyCon                    -- ^ PA
         , paDataCon        :: DataCon                  -- ^ PA
+        , paPRSel          :: Var                       -- ^ PA
         , preprTyCon       :: TyCon                    -- ^ PRepr
+        , prClass          :: Class                     -- ^ PR
         , prTyCon          :: TyCon                    -- ^ PR
         , prDataCon        :: DataCon                  -- ^ PR
         , replicatePDVar   :: Var                      -- ^ replicatePD
@@ -117,7 +119,15 @@ indexBuiltin
 
 indexBuiltin fn f i bi
   | inRange (bounds xs) i = xs ! i
-  | otherwise            = pprPanic fn (ppr i)
+  | otherwise            
+  = pprSorry "Vectorise.Builtins.indexBuiltin" 
+       (vcat   [ text ""
+               , text "DPH builtin function '" <> text fn <> text "' of size '" <> ppr i <> text "' is not yet implemented."
+               , text "This function does not appear in your source program, but it is needed"
+               , text "to compile your code in the backend. This is a known, current limitation"
+               , text "of DPH. If you want it to to work you should send mail to cvs-ghc@haskell.org"
+               , text "and ask what you can do to help (it might involve some GHC hacking)."])
+
   where        xs = f bi