summaryrefslogtreecommitdiff
path: root/src/Data/Array/Mixed.hs
diff options
context:
space:
mode:
authorMikolaj Konarski <mikolaj.konarski@gmail.com>2024-04-21 23:07:33 +0200
committerMikolaj Konarski <mikolaj.konarski@gmail.com>2024-04-21 23:07:33 +0200
commitf29e8a37daf2ed55ea849c286e1bfb1025b67329 (patch)
tree2f5a7b7b08b85c7f610014807a0611a89585e7a4 /src/Data/Array/Mixed.hs
parent676ec5132670f6fd94302f9487ee6366d12ba70f (diff)
Swap arguments of sized lists to derive Functor, etc.
Diffstat (limited to 'src/Data/Array/Mixed.hs')
-rw-r--r--src/Data/Array/Mixed.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Data/Array/Mixed.hs b/src/Data/Array/Mixed.hs
index d2765b6..8b90547 100644
--- a/src/Data/Array/Mixed.hs
+++ b/src/Data/Array/Mixed.hs
@@ -47,17 +47,17 @@ lemAppAssoc _ _ _ = unsafeCoerce Refl
-- TODO: ListX? But if so, why is StaticShapeX not defined as a newtype
-- over IxX (so that we can make IxX and StaticShapeX a newtype over ListX)?
-type IxX :: Type -> [Maybe Nat] -> Type
-data IxX i sh where
- ZIX :: IxX i '[]
- (:.@) :: forall n sh i. i -> IxX i sh -> IxX i (Just n : sh)
- (:.?) :: forall sh i. i -> IxX i sh -> IxX i (Nothing : sh)
-deriving instance Show i => Show (IxX i sh)
-deriving instance Eq i => Eq (IxX i sh)
+type IxX :: [Maybe Nat] -> Type -> Type
+data IxX sh i where
+ ZIX :: IxX '[] i
+ (:.@) :: forall n sh i. i -> IxX sh i -> IxX (Just n : sh) i
+ (:.?) :: forall sh i. i -> IxX sh i -> IxX (Nothing : sh) i
+deriving instance Show i => Show (IxX sh i)
+deriving instance Eq i => Eq (IxX sh i)
infixr 3 :.@
infixr 3 :.?
-type IIxX = IxX Int
+type IIxX sh = IxX sh Int
-- | The part of a shape that is statically known.
type StaticShapeX :: [Maybe Nat] -> Type