+
+
+instance (Show a, Vector v a) => Show (Vn (v a)) where
+ -- | Display vectors as ordinary tuples. This is poor practice, but
+ -- these results are primarily displayed interactively and
+ -- convenience trumps correctness (said the guy who insists his
+ -- vector lengths be statically checked at compile-time).
+ --
+ -- Examples:
+ --
+ -- >>> let v1 = make2d (1,2)
+ -- >>> show v1
+ -- (1,2)
+ --
+ show (Vn v1) =
+ "(" ++ (intercalate "," element_strings) ++ ")"
+ where
+ v1l = toList v1
+ element_strings = Prelude.map show v1l
+