diff options
author | Ian Lynagh <igloo@earth.li> | 2011-10-02 01:31:05 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-10-02 16:39:08 +0100 |
commit | ac7a7eb93397a2343402f77f1a8a8b4a0e0298df (patch) | |
tree | 86fae1d7598b2ddb94b1c00906468eb54af9a48e /compiler/utils | |
parent | d8d161749c8b13c3db802f348761cff662741c53 (diff) | |
download | haskell-ac7a7eb93397a2343402f77f1a8a8b4a0e0298df.tar.gz |
More CPP removal: pprDynamicLinkerAsmLabel in CLabel
And some knock-on changes
Diffstat (limited to 'compiler/utils')
-rw-r--r-- | compiler/utils/Outputable.lhs | 5 | ||||
-rw-r--r-- | compiler/utils/Platform.hs | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs index 136a1a2151..cd5d2f8531 100644 --- a/compiler/utils/Outputable.lhs +++ b/compiler/utils/Outputable.lhs @@ -622,6 +622,8 @@ instance Outputable Bool where instance Outputable Int where ppr n = int n +instance PlatformOutputable Int where + pprPlatform _ = ppr instance Outputable Word16 where ppr n = integer $ fromIntegral n @@ -651,6 +653,9 @@ instance (PlatformOutputable a, PlatformOutputable b) => PlatformOutputable (a, instance Outputable a => Outputable (Maybe a) where ppr Nothing = ptext (sLit "Nothing") ppr (Just x) = ptext (sLit "Just") <+> ppr x +instance PlatformOutputable a => PlatformOutputable (Maybe a) where + pprPlatform _ Nothing = ptext (sLit "Nothing") + pprPlatform platform (Just x) = ptext (sLit "Just") <+> pprPlatform platform x instance (Outputable a, Outputable b) => Outputable (Either a b) where ppr (Left x) = ptext (sLit "Left") <+> ppr x diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs index 28532aa7f0..362d7822d0 100644 --- a/compiler/utils/Platform.hs +++ b/compiler/utils/Platform.hs @@ -28,6 +28,7 @@ data Platform = Platform { platformArch :: Arch , platformOS :: OS } + deriving (Show, Eq) -- | Architectures that the native code generator knows about. |