aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Data/Array/Nested/Internal/Mixed.hs18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/Data/Array/Nested/Internal/Mixed.hs b/src/Data/Array/Nested/Internal/Mixed.hs
index 53b4f05..3bfda19 100644
--- a/src/Data/Array/Nested/Internal/Mixed.hs
+++ b/src/Data/Array/Nested/Internal/Mixed.hs
@@ -191,12 +191,8 @@ data instance MixedVecs s sh (a, b) = MV_Tup2 !(MixedVecs s sh a) !(MixedVecs s
data instance MixedVecs s sh1 (Mixed sh2 a) = MV_Nest !(IShX sh2) !(MixedVecs s (sh1 ++ sh2) a)
--- Helpers for Show instances for the Mixed arrays
-
-newtype ShowViaToListLinear sh a = ShowViaToListLinear (Mixed sh a)
-
-instance (Show a, Elt a) => Show (ShowViaToListLinear sh a) where
- showsPrec d (ShowViaToListLinear arr) = showParen (d > 10) $
+instance (Show a, Elt a) => Show (Mixed sh a) where
+ showsPrec d arr = showParen (d > 10) $
let defaultResult =
-- TODO: to avoid ambiguity, this should type-apply the shape to mfromListLinear
showString "mfromListLinear " . shows (shxToList (mshape arr)) . showString " "
@@ -209,16 +205,6 @@ instance (Show a, Elt a) => Show (ShowViaToListLinear sh a) where
. showsPrec 11 hd
else defaultResult
-newtype ShowViaPrimitive sh a = ShowViaPrimitive (Mixed sh (Primitive a))
-
-instance (Show a, Storable a) => Show (ShowViaPrimitive sh a) where
- showsPrec d (ShowViaPrimitive parr@(M_Primitive sh _)) = showParen (d > 10) $
- -- TODO: to avoid ambiguity, this should type-apply the shape to mfromListLinear
- showString "mfromListLinear " . shows (shxToList sh) . showString " "
- . shows (coerce @[Primitive a] @[a] (mtoListLinear parr))
-
-deriving via (ShowViaToListLinear sh a) instance (Show a, Elt a) => Show (Mixed sh a)
-
instance Elt a => NFData (Mixed sh a) where
rnf = mrnf