module Data.Array.Repa.Repr.Undefined
( X, Array (..))
where
import Data.Array.Repa.Base
import Data.Array.Repa.Shape
import Data.Array.Repa.Eval.Fill
data X
data instance Array X sh e
= AUndefined !sh
deriving instance Show sh
=> Show (Array X sh e)
deriving instance Read sh
=> Read (Array X sh e)
instance Repr X e where
deepSeqArray _ x
= x
extent (AUndefined sh)
= sh
index (AUndefined _) _
= error $ "Repa: array element is undefined."
linearIndex (AUndefined _) ix
= error $ "Repa: array element at " ++ show ix ++ " is undefined."
instance (Shape sh, Fillable r2 e, Num e) => Fill X r2 sh e where
fillS _ _ = return ()
fillP _ _ = return ()