[commit: ghc] master: Add Outputable instance for HsArg (1a61c6b)
git at git.haskell.org
git at git.haskell.org
Tue Jun 5 00:44:32 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/1a61c6b8c8959ca4cd9500d261ae225210eaff64/ghc
>---------------------------------------------------------------
commit 1a61c6b8c8959ca4cd9500d261ae225210eaff64
Author: Matthew Pickering <matthew.pickering at tweag.io>
Date: Mon Jun 4 17:49:34 2018 -0400
Add Outputable instance for HsArg
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4791
>---------------------------------------------------------------
1a61c6b8c8959ca4cd9500d261ae225210eaff64
compiler/typecheck/TcExpr.hs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/compiler/typecheck/TcExpr.hs b/compiler/typecheck/TcExpr.hs
index 2588899..b59b176 100644
--- a/compiler/typecheck/TcExpr.hs
+++ b/compiler/typecheck/TcExpr.hs
@@ -1098,6 +1098,10 @@ data HsArg tm ty
= HsValArg tm -- Argument is an ordinary expression (f arg)
| HsTypeArg ty -- Argument is a visible type application (f @ty)
+instance (Outputable tm, Outputable ty) => Outputable (HsArg tm ty) where
+ ppr (HsValArg tm) = text "HsValArg" <> ppr tm
+ ppr (HsTypeArg ty) = text "HsTypeArg" <> ppr ty
+
isHsValArg :: HsArg tm ty -> Bool
isHsValArg (HsValArg {}) = True
isHsValArg (HsTypeArg {}) = False
More information about the ghc-commits
mailing list