summaryrefslogtreecommitdiff
path: root/src/Data/Array/Mixed.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Array/Mixed.hs')
-rw-r--r--src/Data/Array/Mixed.hs17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/Data/Array/Mixed.hs b/src/Data/Array/Mixed.hs
index 9a8ccfd..17b0ab4 100644
--- a/src/Data/Array/Mixed.hs
+++ b/src/Data/Array/Mixed.hs
@@ -49,6 +49,7 @@ data IxX sh where
(::@) :: Int -> IxX sh -> IxX (Just n : sh)
(::?) :: Int -> IxX sh -> IxX (Nothing : sh)
deriving instance Show (IxX sh)
+deriving instance Eq (IxX sh)
infixr 5 ::@
infixr 5 ::?
@@ -81,15 +82,15 @@ type XArray :: [Maybe Nat] -> Type -> Type
newtype XArray sh a = XArray (S.Array (FromINat (Rank sh)) a)
deriving (Show)
-zeroIdx :: StaticShapeX sh -> IxX sh
-zeroIdx SZX = IZX
-zeroIdx (_ :$@ ssh) = 0 ::@ zeroIdx ssh
-zeroIdx (_ :$? ssh) = 0 ::? zeroIdx ssh
+zeroIxX :: StaticShapeX sh -> IxX sh
+zeroIxX SZX = IZX
+zeroIxX (_ :$@ ssh) = 0 ::@ zeroIxX ssh
+zeroIxX (_ :$? ssh) = 0 ::? zeroIxX ssh
-zeroIdx' :: IxX sh -> IxX sh
-zeroIdx' IZX = IZX
-zeroIdx' (_ ::@ sh) = 0 ::@ zeroIdx' sh
-zeroIdx' (_ ::? sh) = 0 ::? zeroIdx' sh
+zeroIxX' :: IxX sh -> IxX sh
+zeroIxX' IZX = IZX
+zeroIxX' (_ ::@ sh) = 0 ::@ zeroIxX' sh
+zeroIxX' (_ ::? sh) = 0 ::? zeroIxX' sh
ixAppend :: IxX sh -> IxX sh' -> IxX (sh ++ sh')
ixAppend IZX idx' = idx'