[commit: ghc] master: Add Outputable instance for ArityType (ebb36b2)
git at git.haskell.org
git at git.haskell.org
Wed Apr 12 15:16:49 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/ebb36b2c903abf20a955ea4e81f168b1ddf1a452/ghc
>---------------------------------------------------------------
commit ebb36b2c903abf20a955ea4e81f168b1ddf1a452
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Tue Apr 11 15:36:30 2017 +0100
Add Outputable instance for ArityType
>---------------------------------------------------------------
ebb36b2c903abf20a955ea4e81f168b1ddf1a452
compiler/coreSyn/CoreArity.hs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/compiler/coreSyn/CoreArity.hs b/compiler/coreSyn/CoreArity.hs
index 88c3a7a..dd70772 100644
--- a/compiler/coreSyn/CoreArity.hs
+++ b/compiler/coreSyn/CoreArity.hs
@@ -484,6 +484,10 @@ data ArityType = ATop [OneShotInfo] | ABot Arity
-- There is always an explicit lambda
-- to justify the [OneShot], or the Arity
+instance Outputable ArityType where
+ ppr (ATop os) = text "ATop" <> parens (ppr (length os))
+ ppr (ABot n) = text "ABot" <> parens (ppr n)
+
vanillaArityType :: ArityType
vanillaArityType = ATop [] -- Totally uninformative
More information about the ghc-commits
mailing list