instance (Ix a, Show a, Show b) => Show (Array a b) where
showsPrec p a =
- showParen (p > 9) $
+ showParen (p > appPrec) $
showString "array " .
- shows (bounds a) .
+ showsPrec appPrec1 (bounds a) .
showChar ' ' .
- shows (assocs a)
-
-{-
-instance (Ix a, Read a, Read b) => Read (Array a b) where
- readsPrec p = readParen (p > 9)
- (\r -> [(array b as, u) | ("array",s) <- lex r,
- (b,t) <- reads s,
- (as,u) <- reads t ])
--}
+ showsPrec appPrec1 (assocs a)
+ -- Precedence of 'array' is the precedence of application
+
+-- The Read instance is in GHC.Read
\end{code}