summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorPeter Wortmann <scpmw@leeds.ac.uk>2013-06-26 15:49:10 +0100
committerDavid Terei <davidterei@gmail.com>2013-06-27 13:39:11 -0700
commit99d39221cfa6f6b8ccf950763a73ad32edd7beef (patch)
tree662795f6af785ae0371c925a3fcd2a3761469fae /compiler/utils
parent12148d91bc0b0ab68392491bd1c927d7a8698205 (diff)
downloadhaskell-99d39221cfa6f6b8ccf950763a73ad32edd7beef.tar.gz
Use SDoc for all LLVM pretty-printing
This patch reworks some parts of the LLVM pretty-printing code that were still using Show and String. Now we should be using SDoc and Outputable throughout. Note that many get*Name functions become pp*Name here as a side-effect.
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Outputable.lhs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs
index 88a8a75c62..da8ffb3f10 100644
--- a/compiler/utils/Outputable.lhs
+++ b/compiler/utils/Outputable.lhs
@@ -90,6 +90,7 @@ import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import Data.Char
import qualified Data.Map as M
+import Data.Int
import qualified Data.IntMap as IM
import Data.Set (Set)
import qualified Data.Set as Set
@@ -619,6 +620,12 @@ instance Outputable Bool where
ppr True = ptext (sLit "True")
ppr False = ptext (sLit "False")
+instance Outputable Int32 where
+ ppr n = integer $ fromIntegral n
+
+instance Outputable Int64 where
+ ppr n = integer $ fromIntegral n
+
instance Outputable Int where
ppr n = int n