[commit: ghc] wip/T9858-typeable-ben: Unify: Add Outputable instance for UnifyResultM (f992424)
git at git.haskell.org
git at git.haskell.org
Wed Oct 28 10:16:59 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T9858-typeable-ben
Link : http://ghc.haskell.org/trac/ghc/changeset/f9924244223dea7cd6e1c1bd7ba4e6b32834fc8c/ghc
>---------------------------------------------------------------
commit f9924244223dea7cd6e1c1bd7ba4e6b32834fc8c
Author: Ben Gamari <ben at smart-cactus.org>
Date: Wed Oct 28 02:21:16 2015 +0100
Unify: Add Outputable instance for UnifyResultM
>---------------------------------------------------------------
f9924244223dea7cd6e1c1bd7ba4e6b32834fc8c
compiler/types/Unify.hs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/compiler/types/Unify.hs b/compiler/types/Unify.hs
index de22066..87681e0 100644
--- a/compiler/types/Unify.hs
+++ b/compiler/types/Unify.hs
@@ -30,6 +30,8 @@ import Type
import TyCon
import TypeRep
import Util ( filterByList )
+import Outputable
+import FastString (sLit)
import Control.Monad (liftM, foldM, ap)
#if __GLASGOW_HASKELL__ < 709
@@ -475,6 +477,11 @@ tcUnifyTysFG :: (TyVar -> BindFlag)
tcUnifyTysFG bind_fn tys1 tys2
= initUM bind_fn (unify_tys tys1 tys2)
+instance Outputable a => Outputable (UnifyResultM a) where
+ ppr SurelyApart = ptext (sLit "SurelyApart")
+ ppr (Unifiable x) = ptext (sLit "Unifiable") <+> ppr x
+ ppr (MaybeApart x) = ptext (sLit "MaybeApart") <+> ppr x
+
{-
************************************************************************
* *
More information about the ghc-commits
mailing list