[commit: ghc] master: Define an Outputable MCoercion instance (6595bee)
git at git.haskell.org
git at git.haskell.org
Sun Jul 8 16:24:09 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/6595bee749ddb49d9058ed47ab7c1b6e7558ae17/ghc
>---------------------------------------------------------------
commit 6595bee749ddb49d9058ed47ab7c1b6e7558ae17
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date: Sun Jul 8 12:20:53 2018 -0400
Define an Outputable MCoercion instance
Summary: I needed this when debugging #15346.
Test Plan: Does it compile? It does? Cool.
Reviewers: bgamari, mpickering
Reviewed By: mpickering
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15311
Differential Revision: https://phabricator.haskell.org/D4944
>---------------------------------------------------------------
6595bee749ddb49d9058ed47ab7c1b6e7558ae17
compiler/types/TyCoRep.hs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/compiler/types/TyCoRep.hs b/compiler/types/TyCoRep.hs
index 7923369..0ec5888 100644
--- a/compiler/types/TyCoRep.hs
+++ b/compiler/types/TyCoRep.hs
@@ -964,6 +964,10 @@ data MCoercion
-- Other coercions
type MCoercionR = MCoercion
+instance Outputable MCoercion where
+ ppr MRefl = text "MRefl"
+ ppr (MCo co) = text "MCo" <+> ppr co
+
{-
Note [Refl invariant]
~~~~~~~~~~~~~~~~~~~~~
More information about the ghc-commits
mailing list