projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2003-09-23 10:09:17 by panne]
[ghc-base.git]
/
GHC
/
Arr.lhs
diff --git
a/GHC/Arr.lhs
b/GHC/Arr.lhs
index
dd8218c
..
5c4c9d6
100644
(file)
--- a/
GHC/Arr.lhs
+++ b/
GHC/Arr.lhs
@@
-284,7
+284,7
@@
data Ix i => Array i e = Array !i !i (Array# e)
--
-- * @s@: the state variable argument for the 'ST' type
--
--
-- * @s@: the state variable argument for the 'ST' type
--
--- * @i@: the index type of the array (should be an instance of @Ix@)
+-- * @i@: the index type of the array (should be an instance of 'Ix')
--
-- * @e@: the element type of the array.
--
--
-- * @e@: the element type of the array.
--
@@
-476,11
+476,12
@@
instance (Ix i, Ord e) => Ord (Array i e) where
instance (Ix a, Show a, Show b) => Show (Array a b) where
showsPrec p a =
instance (Ix a, Show a, Show b) => Show (Array a b) where
showsPrec p a =
- showParen (p > 9) $
+ showParen (p > appPrec) $
showString "array " .
showString "array " .
- shows (bounds a) .
+ showsPrec appPrec1 (bounds a) .
showChar ' ' .
showChar ' ' .
- shows (assocs a)
+ showsPrec appPrec1 (assocs a)
+ -- Precedence of 'array' is the precedence of application
-- The Read instance is in GHC.Read
\end{code}
-- The Read instance is in GHC.Read
\end{code}