projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c1c6e20
)
Add an (Outputable Word16) instance
author
Ian Lynagh
<igloo@earth.li>
Tue, 28 Jul 2009 13:44:36 +0000
(13:44 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Tue, 28 Jul 2009 13:44:36 +0000
(13:44 +0000)
compiler/utils/Outputable.lhs
patch
|
blob
|
history
diff --git
a/compiler/utils/Outputable.lhs
b/compiler/utils/Outputable.lhs
index
7350f0a
..
fc5a87e
100644
(file)
--- a/
compiler/utils/Outputable.lhs
+++ b/
compiler/utils/Outputable.lhs
@@
-74,7
+74,7
@@
import Pretty ( Doc, Mode(..) )
import Panic
import Data.Char
import Panic
import Data.Char
-import Data.Word ( Word32 )
+import Data.Word
import System.IO ( Handle, stderr, stdout, hFlush )
import System.FilePath
\end{code}
import System.IO ( Handle, stderr, stdout, hFlush )
import System.FilePath
\end{code}
@@
-495,6
+495,9
@@
instance Outputable Bool where
instance Outputable Int where
ppr n = int n
instance Outputable Int where
ppr n = int n
+instance Outputable Word16 where
+ ppr n = integer $ fromIntegral n
+
instance Outputable Word32 where
ppr n = integer $ fromIntegral n
instance Outputable Word32 where
ppr n = integer $ fromIntegral n