diff options
Diffstat (limited to 'src/Data')
-rw-r--r-- | src/Data/Array/Nested/Internal.hs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/Data/Array/Nested/Internal.hs b/src/Data/Array/Nested/Internal.hs index 3f885e4..440f52b 100644 --- a/src/Data/Array/Nested/Internal.hs +++ b/src/Data/Array/Nested/Internal.hs @@ -861,10 +861,9 @@ data ListR n i where deriving instance Show i => Show (ListR n i) deriving instance Eq i => Eq (ListR n i) deriving instance Ord i => Ord (ListR n i) +deriving instance Functor (ListR n) infixr 3 ::: -deriving stock instance Functor (ListR n) - instance Foldable (ListR n) where foldr f z l = foldr f z (listRToList l) @@ -881,8 +880,7 @@ type role IxR nominal representational type IxR :: INat -> Type -> Type newtype IxR n i = IxR (ListR n i) deriving (Show, Eq, Ord) - -deriving newtype instance Functor (IxR n) + deriving newtype (Functor) instance Foldable (IxR n) where foldr f z (IxR l) = foldr f z l @@ -915,8 +913,7 @@ type role ShR nominal representational type ShR :: INat -> Type -> Type newtype ShR n i = ShR (ListR n i) deriving (Show, Eq, Ord) - -deriving newtype instance Functor (ShR n) + deriving newtype (Functor) instance Foldable (ShR n) where foldr f z (ShR l) = foldr f z l @@ -1083,10 +1080,9 @@ data ListS sh i where deriving instance Show i => Show (ListS sh i) deriving instance Eq i => Eq (ListS sh i) deriving instance Ord i => Ord (ListS sh i) +deriving instance Functor (ListS sh) infixr 3 ::$ -deriving stock instance Functor (ListS sh) - instance Foldable (ListS sh) where foldr f z l = foldr f z (listSToList l) @@ -1104,8 +1100,7 @@ type role IxS nominal representational type IxS :: [Nat] -> Type -> Type newtype IxS sh i = IxS (ListS sh i) deriving (Show, Eq, Ord) - -deriving newtype instance Functor (IxS sh) + deriving newtype (Functor) instance Foldable (IxS sh) where foldr f z (IxS l) = foldr f z l @@ -1135,8 +1130,7 @@ type role ShS nominal representational type ShS :: [Nat] -> Type -> Type newtype ShS sh i = ShS (ListS sh i) deriving (Show, Eq, Ord) - -deriving newtype instance Functor (ShS sh) + deriving newtype (Functor) instance Foldable (ShS sh) where foldr f z (ShS l) = foldr f z l |