Index: src/ResolvExpr/CandidatePrinter.cpp
===================================================================
--- src/ResolvExpr/CandidatePrinter.cpp	(revision aa0a1ade2bfb208ba73cd9f6a0f68aeec6a635dc)
+++ src/ResolvExpr/CandidatePrinter.cpp	(revision aa0a1ade2bfb208ba73cd9f6a0f68aeec6a635dc)
@@ -0,0 +1,62 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// CandidatePrinter.cpp -- Print expression canditates.
+//
+// Author           : Andrew Beach
+// Created On       : Tue Nov  9  9:54:00 2021
+// Last Modified By : Andrew Beach
+// Last Modified On : Tue Nov  9 15:47:00 2021
+// Update Count     : 0
+//
+
+#include "CandidatePrinter.hpp"
+
+#include "AST/Expr.hpp"
+#include "AST/Pass.hpp"
+#include "AST/Print.hpp"
+#include "AST/Stmt.hpp"
+#include "AST/TranslationUnit.hpp"
+#include "ResolvExpr/CandidateFinder.hpp"
+
+#include <iostream>
+
+namespace ResolvExpr {
+
+namespace {
+
+class CandidatePrintCore : public ast::WithSymbolTable {
+	std::ostream & os;
+public:
+	CandidatePrintCore( std::ostream & os ) : os( os ) {}
+
+	void postvisit( const ast::ExprStmt * stmt ) {
+		ast::TypeEnvironment env;
+		CandidateFinder finder( symtab, env );
+		finder.find( stmt->expr, ResolvMode::withAdjustment() );
+		int count = 1;
+		os << "There are " << finder.candidates.size() << " candidates\n";
+		for ( const std::shared_ptr<Candidate> & cand : finder ) {
+			os << "Candidate " << count++ << " ==============\n";
+			ast::print( os, cand->expr->result.get() );
+			os << std::endl;
+		}
+	}
+};
+
+} // namespace
+
+void printCandidates( ast::TranslationUnit & transUnit ) {
+	ast::Pass<CandidatePrintCore>::run( transUnit, std::cout );
+}
+
+} // namespace ResolvExpr
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/ResolvExpr/CandidatePrinter.hpp
===================================================================
--- src/ResolvExpr/CandidatePrinter.hpp	(revision aa0a1ade2bfb208ba73cd9f6a0f68aeec6a635dc)
+++ src/ResolvExpr/CandidatePrinter.hpp	(revision aa0a1ade2bfb208ba73cd9f6a0f68aeec6a635dc)
@@ -0,0 +1,35 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// CandidatePrinter.hpp -- Print expression canditates.
+//
+// Author           : Andrew Beach
+// Created On       : Tue Nov  9  9:49:00 2021
+// Last Modified By : Andrew Beach
+// Last Modified On : Tue Nov  9 15:33:00 2021
+// Update Count     : 0
+//
+
+#pragma once
+
+namespace ast {
+    class TranslationUnit;
+}
+
+namespace ResolvExpr {
+
+void printCandidates( ast::TranslationUnit & transUnit );
+/* Traverse over the entire translation unit, printing candidates for each
+ * top level expression. See CandidateFinder.
+ */
+
+} // namespace ResolvExpr
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/ResolvExpr/module.mk
===================================================================
--- src/ResolvExpr/module.mk	(revision 7f62b70877e4fa96cf64abb308b9ef2b9528dde9)
+++ src/ResolvExpr/module.mk	(revision aa0a1ade2bfb208ba73cd9f6a0f68aeec6a635dc)
@@ -61,5 +61,9 @@
       ResolvExpr/WidenMode.h
 
+SRC += $(SRC_RESOLVEXPR) \
+	ResolvExpr/AlternativePrinter.cc \
+	ResolvExpr/AlternativePrinter.h \
+	ResolvExpr/CandidatePrinter.cpp \
+	ResolvExpr/CandidatePrinter.hpp
 
-SRC += $(SRC_RESOLVEXPR) ResolvExpr/AlternativePrinter.cc ResolvExpr/AlternativePrinter.h
 SRCDEMANGLE += $(SRC_RESOLVEXPR)
