From 6e890e8c9b960805c87268e9b3ce2e3d4a58297b Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Thu, 11 May 2017 15:42:02 -0400 Subject: Add Outputable instance for Node Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3564 --- compiler/utils/Digraph.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/utils') diff --git a/compiler/utils/Digraph.hs b/compiler/utils/Digraph.hs index fe325e6a06..e3b5037bf3 100644 --- a/compiler/utils/Digraph.hs +++ b/compiler/utils/Digraph.hs @@ -99,6 +99,9 @@ data Node key payload = DigraphNode { -- it's ok to have extra keys in the dependencies that -- are not the key of any Node in the graph +instance (Outputable a, Outputable b) => Outputable (Node a b) where + ppr (DigraphNode a b c) = ppr (a, b, c) + emptyGraph :: Graph a emptyGraph = Graph (array (1, 0) []) (error "emptyGraph") (const Nothing) -- cgit v1.2.1