Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision 8fd52e90372722cd58a940aabae4889d3072d17a)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 6f096d2341e25591a9d9435e4a28725954748a7a)
@@ -336,7 +336,7 @@
 		}
 
-		if ( StructInstType *structInst = dynamic_cast< StructInstType* >( aggrExpr->result ) ) {
+		if ( StructInstType * structInst = dynamic_cast< StructInstType* >( aggrExpr->result ) ) {
 			addAggMembers( structInst, aggrExpr.get(), alt, alt.cost+Cost::safe, "" );
-		} else if ( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( aggrExpr->result ) ) {
+		} else if ( UnionInstType * unionInst = dynamic_cast< UnionInstType* >( aggrExpr->result ) ) {
 			addAggMembers( unionInst, aggrExpr.get(), alt, alt.cost+Cost::safe, "" );
 		} // if
@@ -344,10 +344,10 @@
 
 	template< typename StructOrUnionType >
-	void AlternativeFinder::Finder::addAggMembers( StructOrUnionType *aggInst, Expression *expr, const Alternative& alt, const Cost &newCost, const std::string & name ) {
+	void AlternativeFinder::Finder::addAggMembers( StructOrUnionType * aggInst, Expression * expr, const Alternative& alt, const Cost &newCost, const std::string & name ) {
 		std::list< Declaration* > members;
 		aggInst->lookup( name, members );
 
 		for ( Declaration * decl : members ) {
-			if ( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType* >( decl ) ) {
+			if ( DeclarationWithType * dwt = dynamic_cast< DeclarationWithType* >( decl ) ) {
 				// addAnonAlternatives uses vector::push_back, which invalidates references to existing elements, so
 				// can't construct in place and use vector::back
@@ -362,5 +362,5 @@
 	}
 
-	void AlternativeFinder::Finder::addTupleMembers( TupleType *tupleType, Expression *expr, 			const Alternative &alt, const Cost &newCost, Expression *member ) {
+	void AlternativeFinder::Finder::addTupleMembers( TupleType * tupleType, Expression * expr, const Alternative &alt, const Cost &newCost, Expression * member ) {
 		if ( ConstantExpr * constantExpr = dynamic_cast< ConstantExpr * >( member ) ) {
 			// get the value of the constant expression as an int, must be between 0 and the length of the tuple type to have meaning
@@ -368,5 +368,5 @@
 			std::string tmp;
 			if ( val >= 0 && (unsigned long long)val < tupleType->size() ) {
-				alternatives.push_back( Alternative{ 
+				alternatives.push_back( Alternative{
 					alt, new TupleIndexExpr( expr->clone(), val ), newCost } );
 			} // if
@@ -374,5 +374,5 @@
 	}
 
-	void AlternativeFinder::Finder::postvisit( ApplicationExpr *applicationExpr ) {
+	void AlternativeFinder::Finder::postvisit( ApplicationExpr * applicationExpr ) {
 		alternatives.push_back( Alternative{ applicationExpr->clone(), env } );
 	}
@@ -475,5 +475,5 @@
 		}
 
-		// specialization cost of return types can't be accounted for directly, it disables 
+		// specialization cost of return types can't be accounted for directly, it disables
 		// otherwise-identical calls, like this example based on auto-newline in the I/O lib:
 		//
@@ -1226,6 +1226,6 @@
 				// count one safe conversion for each value that is thrown away
 				thisCost.incSafe( discardedValues );
-				Alternative newAlt{ 
-					restructureCast( alt.expr->clone(), toType, castExpr->isGenerated ), 
+				Alternative newAlt{
+					restructureCast( alt.expr->clone(), toType, castExpr->isGenerated ),
 					alt.env, openVars, needAssertions, alt.cost, alt.cost + thisCost };
 				inferParameters( newAlt, back_inserter( candidates ) );
@@ -1328,5 +1328,5 @@
 		if ( sizeofExpr->get_isType() ) {
 			Type * newType = sizeofExpr->get_type()->clone();
-			alternatives.push_back( Alternative{ 
+			alternatives.push_back( Alternative{
 				new SizeofExpr{ resolveTypeof( newType, indexer ) }, env } );
 		} else {
@@ -1343,5 +1343,5 @@
 			Alternative &choice = winners.front();
 			referenceToRvalueConversion( choice.expr, choice.cost );
-			alternatives.push_back( Alternative{ 
+			alternatives.push_back( Alternative{
 				choice, new SizeofExpr( choice.expr->clone() ), Cost::zero } );
 		} // if
@@ -1351,5 +1351,5 @@
 		if ( alignofExpr->get_isType() ) {
 			Type * newType = alignofExpr->get_type()->clone();
-			alternatives.push_back( Alternative{ 
+			alternatives.push_back( Alternative{
 				new AlignofExpr{ resolveTypeof( newType, indexer ) }, env } );
 		} else {
@@ -1366,5 +1366,5 @@
 			Alternative &choice = winners.front();
 			referenceToRvalueConversion( choice.expr, choice.cost );
-			alternatives.push_back( Alternative{ 
+			alternatives.push_back( Alternative{
 				choice, new AlignofExpr{ choice.expr->clone() }, Cost::zero } );
 		} // if
@@ -1377,5 +1377,5 @@
 		for ( std::list< Declaration* >::const_iterator i = members.begin(); i != members.end(); ++i ) {
 			if ( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType* >( *i ) ) {
-				alternatives.push_back( Alternative{ 
+				alternatives.push_back( Alternative{
 					new OffsetofExpr{ aggInst->clone(), dwt }, env } );
 				renameTypes( alternatives.back().expr );
@@ -1405,8 +1405,8 @@
 
 	namespace {
-		void resolveAttr( SymTab::Indexer::IdData data, FunctionType *function, Type *argType, const TypeEnvironment &env, AlternativeFinder & finder ) {
+		void resolveAttr( SymTab::Indexer::IdData data, const FunctionType * function, Type * argType, const TypeEnvironment &env, AlternativeFinder & finder ) {
 			// assume no polymorphism
 			// assume no implicit conversions
-			assert( function->get_parameters().size() == 1 );
+			assert( function->parameters.size() == 1 );
 			PRINT(
 				std::cerr << "resolvAttr: funcDecl is ";
@@ -1418,9 +1418,9 @@
 			const SymTab::Indexer & indexer = finder.get_indexer();
 			AltList & alternatives = finder.get_alternatives();
-			if ( typesCompatibleIgnoreQualifiers( argType, function->get_parameters().front()->get_type(), indexer, env ) ) {
+			if ( typesCompatibleIgnoreQualifiers( argType, function->parameters.front()->get_type(), indexer, env ) ) {
 				Cost cost = Cost::zero;
 				Expression * newExpr = data.combine( cost );
-				alternatives.push_back( Alternative{ 
-					new AttrExpr{ newExpr, argType->clone() }, env, OpenVarSet{}, 
+				alternatives.push_back( Alternative{
+					new AttrExpr{ newExpr, argType->clone() }, env, OpenVarSet{},
 					AssertionList{}, Cost::zero, cost } );
 				for ( DeclarationWithType * retVal : function->returnVals ) {
@@ -1431,7 +1431,7 @@
 	}
 
-	void AlternativeFinder::Finder::postvisit( AttrExpr *attrExpr ) {
+	void AlternativeFinder::Finder::postvisit( AttrExpr * attrExpr ) {
 		// assume no 'pointer-to-attribute'
-		NameExpr *nameExpr = dynamic_cast< NameExpr* >( attrExpr->get_attr() );
+		NameExpr * nameExpr = dynamic_cast< NameExpr* >( attrExpr->get_attr() );
 		assert( nameExpr );
 		std::list< SymTab::Indexer::IdData > attrList;
@@ -1439,9 +1439,9 @@
 		if ( attrExpr->get_isType() || attrExpr->get_expr() ) {
 			for ( auto & data : attrList ) {
-				DeclarationWithType * id = data.id;
+				const DeclarationWithType * id = data.id;
 				// check if the type is function
-				if ( FunctionType *function = dynamic_cast< FunctionType* >( id->get_type() ) ) {
+				if ( const FunctionType * function = dynamic_cast< const FunctionType * >( id->get_type() ) ) {
 					// assume exactly one parameter
-					if ( function->get_parameters().size() == 1 ) {
+					if ( function->parameters.size() == 1 ) {
 						if ( attrExpr->get_isType() ) {
 							resolveAttr( data, function, attrExpr->get_type(), env, altFinder);
@@ -1462,5 +1462,5 @@
 				Cost cost = Cost::zero;
 				Expression * newExpr = data.combine( cost );
-				alternatives.push_back( Alternative{ 
+				alternatives.push_back( Alternative{
 					newExpr, env, OpenVarSet{}, AssertionList{}, Cost::zero, cost } );
 				renameTypes( alternatives.back().expr );
@@ -1469,5 +1469,5 @@
 	}
 
-	void AlternativeFinder::Finder::postvisit( LogicalExpr *logicalExpr ) {
+	void AlternativeFinder::Finder::postvisit( LogicalExpr * logicalExpr ) {
 		AlternativeFinder firstFinder( indexer, env );
 		firstFinder.findWithAdjustment( logicalExpr->get_arg1() );
@@ -1486,8 +1486,8 @@
 				cloneAll( second.need, need );
 
-				LogicalExpr *newExpr = new LogicalExpr{ 
+				LogicalExpr *newExpr = new LogicalExpr{
 					first.expr->clone(), second.expr->clone(), logicalExpr->get_isAnd() };
-				alternatives.push_back( Alternative{ 
-					newExpr, std::move(compositeEnv), std::move(openVars), 
+				alternatives.push_back( Alternative{
+					newExpr, std::move(compositeEnv), std::move(openVars),
 					AssertionList( need.begin(), need.end() ), first.cost + second.cost } );
 			}
@@ -1522,21 +1522,21 @@
 					cloneAll( third.need, need );
 					AssertionSet have;
-					
+
 					// unify true and false types, then infer parameters to produce new alternatives
 					Type* commonType = nullptr;
-					if ( unify( second.expr->result, third.expr->result, compositeEnv, 
+					if ( unify( second.expr->result, third.expr->result, compositeEnv,
 							need, have, openVars, indexer, commonType ) ) {
-						ConditionalExpr *newExpr = new ConditionalExpr{ 
+						ConditionalExpr *newExpr = new ConditionalExpr{
 							first.expr->clone(), second.expr->clone(), third.expr->clone() };
 						newExpr->result = commonType ? commonType : second.expr->result->clone();
 						// convert both options to the conditional result type
 						Cost cost = first.cost + second.cost + third.cost;
-						cost += computeExpressionConversionCost( 
+						cost += computeExpressionConversionCost(
 							newExpr->arg2, newExpr->result, indexer, compositeEnv );
-						cost += computeExpressionConversionCost( 
+						cost += computeExpressionConversionCost(
 							newExpr->arg3, newExpr->result, indexer, compositeEnv );
 						// output alternative
-						Alternative newAlt{ 
-							newExpr, std::move(compositeEnv), std::move(openVars), 
+						Alternative newAlt{
+							newExpr, std::move(compositeEnv), std::move(openVars),
 							AssertionList( need.begin(), need.end() ), cost };
 						inferParameters( newAlt, back_inserter( alternatives ) );
@@ -1553,5 +1553,5 @@
 		secondFinder.findWithAdjustment( commaExpr->get_arg2() );
 		for ( const Alternative & alt : secondFinder.alternatives ) {
-			alternatives.push_back( Alternative{ 
+			alternatives.push_back( Alternative{
 				alt, new CommaExpr{ newFirstArg->clone(), alt.expr->clone() }, alt.cost } );
 		} // for
@@ -1579,11 +1579,11 @@
 
 				Type* commonType = nullptr;
-				if ( unify( first.expr->result, second.expr->result, compositeEnv, need, have, 
+				if ( unify( first.expr->result, second.expr->result, compositeEnv, need, have,
 						openVars, indexer, commonType ) ) {
-					RangeExpr * newExpr = 
+					RangeExpr * newExpr =
 						new RangeExpr{ first.expr->clone(), second.expr->clone() };
 					newExpr->result = commonType ? commonType : first.expr->result->clone();
-					Alternative newAlt{ 
-						newExpr, std::move(compositeEnv), std::move(openVars), 
+					Alternative newAlt{
+						newExpr, std::move(compositeEnv), std::move(openVars),
 						AssertionList( need.begin(), need.end() ), first.cost + second.cost };
 					inferParameters( newAlt, back_inserter( alternatives ) );
@@ -1612,7 +1612,7 @@
 				cloneAll( alt.need, need );
 			}
-			
-			alternatives.push_back( Alternative{ 
-				new TupleExpr{ exprs }, std::move(compositeEnv), std::move(openVars), 
+
+			alternatives.push_back( Alternative{
+				new TupleExpr{ exprs }, std::move(compositeEnv), std::move(openVars),
 				AssertionList( need.begin(), need.end() ), sumCost( alts ) } );
 		} // for
@@ -1633,5 +1633,5 @@
 		finder.findWithoutPrune( ctorExpr->get_callExpr() );
 		for ( Alternative & alt : finder.alternatives ) {
-			alternatives.push_back( Alternative{ 
+			alternatives.push_back( Alternative{
 				alt, new ConstructorExpr( alt.expr->clone() ), alt.cost } );
 		}
@@ -1685,21 +1685,21 @@
 				cloneAll( alt.need, need );
 				AssertionSet have;
-				OpenVarSet openVars( alt.openVars );  
-				// xxx - find things in env that don't have a "representative type" and claim 
+				OpenVarSet openVars( alt.openVars );
+				// xxx - find things in env that don't have a "representative type" and claim
 				// those are open vars?
 				PRINT(
 					std::cerr << "  @ " << toType << " " << initAlt.designation << std::endl;
 				)
-				// It's possible that a cast can throw away some values in a multiply-valued 
-				// expression. (An example is a cast-to-void, which casts from one value to 
-				// zero.)  Figure out the prefix of the subexpression results that are cast 
-				// directly.  The candidate is invalid if it has fewer results than there are 
+				// It's possible that a cast can throw away some values in a multiply-valued
+				// expression. (An example is a cast-to-void, which casts from one value to
+				// zero.)  Figure out the prefix of the subexpression results that are cast
+				// directly.  The candidate is invalid if it has fewer results than there are
 				// types to cast to.
 				int discardedValues = alt.expr->result->size() - toType->size();
 				if ( discardedValues < 0 ) continue;
-				// xxx - may need to go into tuple types and extract relevant types and use 
-				// unifyList. Note that currently, this does not allow casting a tuple to an 
+				// xxx - may need to go into tuple types and extract relevant types and use
+				// unifyList. Note that currently, this does not allow casting a tuple to an
 				// atomic type (e.g. (int)([1, 2, 3]))
-				
+
 				// unification run for side-effects
 				unify( toType, alt.expr->result, newEnv, need, have, openVars, indexer );
@@ -1710,8 +1710,8 @@
 					// count one safe conversion for each value that is thrown away
 					thisCost.incSafe( discardedValues );
-					Alternative newAlt{ 
-						new InitExpr{ 
-							restructureCast( alt.expr->clone(), toType, true ), initAlt.designation->clone() }, 
-						std::move(newEnv), std::move(openVars), 
+					Alternative newAlt{
+						new InitExpr{
+							restructureCast( alt.expr->clone(), toType, true ), initAlt.designation->clone() },
+						std::move(newEnv), std::move(openVars),
 						AssertionList( need.begin(), need.end() ), alt.cost, thisCost };
 					inferParameters( newAlt, back_inserter( candidates ) );
Index: src/ResolvExpr/ResolveAssertions.cc
===================================================================
--- src/ResolvExpr/ResolveAssertions.cc	(revision 8fd52e90372722cd58a940aabae4889d3072d17a)
+++ src/ResolvExpr/ResolveAssertions.cc	(revision 6f096d2341e25591a9d9435e4a28725954748a7a)
@@ -197,5 +197,5 @@
 			}
 			if ( i == b.size() /* && i < a.size() */ ) return 1;
-			
+
 			int c = a[i].compare( b[i] );
 			if ( c != 0 ) return c;
@@ -220,5 +220,5 @@
 
 		/// Initial resolution state for an alternative
-		ResnState( Alternative& a, SymTab::Indexer& indexer )
+		ResnState( Alternative & a, SymTab::Indexer & indexer )
 		: alt(a), need(), newNeed(), deferred(), inferred(), costs{ Cost::zero }, indexer(indexer) {
 			need.swap( a.need );
@@ -226,5 +226,5 @@
 
 		/// Updated resolution state with new need-list
-		ResnState( ResnState&& o, IterateFlag )
+		ResnState( ResnState && o, IterateFlag )
 		: alt(std::move(o.alt)), need(o.newNeed.begin(), o.newNeed.end()), newNeed(), deferred(),
 		  inferred(std::move(o.inferred)), costs(o.costs), indexer(o.indexer) {
@@ -234,11 +234,11 @@
 
 	/// Binds a single assertion, updating resolution state
-	void bindAssertion( const DeclarationWithType* decl, AssertionSetValue info, Alternative& alt,
-			AssnCandidate& match, InferCache& inferred ) {
-
-		DeclarationWithType* candidate = match.cdata.id;
-		assertf( candidate->get_uniqueId(), "Assertion candidate does not have a unique ID: %s", toString( candidate ).c_str() );
-
-		Expression* varExpr = match.cdata.combine( alt.cvtCost );
+	void bindAssertion( const DeclarationWithType * decl, AssertionSetValue info, Alternative & alt,
+			AssnCandidate & match, InferCache & inferred ) {
+
+		const DeclarationWithType * candidate = match.cdata.id;
+		assertf( candidate->uniqueId, "Assertion candidate does not have a unique ID: %s", toString( candidate ).c_str() );
+
+		Expression * varExpr = match.cdata.combine( alt.cvtCost );
 		delete varExpr->result;
 		varExpr->result = match.adjType->clone();
@@ -247,10 +247,10 @@
 		// place newly-inferred assertion in proper place in cache
 		inferred[ info.resnSlot ][ decl->get_uniqueId() ] = ParamEntry{
-				candidate->get_uniqueId(), candidate->clone(), match.adjType->clone(), decl->get_type()->clone(),
+				candidate->uniqueId, candidate->clone(), match.adjType->clone(), decl->get_type()->clone(),
 				varExpr };
 	}
 
 	/// Adds a captured assertion to the symbol table
-	void addToIndexer( AssertionSet &assertSet, SymTab::Indexer &indexer ) {
+	void addToIndexer( AssertionSet & assertSet, SymTab::Indexer & indexer ) {
 		for ( auto&  i : assertSet ) {
 			if ( i.second.isUsed ) {
@@ -264,5 +264,5 @@
 
 	/// Resolve a single assertion, in context
-	bool resolveAssertion( AssertionItem& assn, ResnState& resn ) {
+	bool resolveAssertion( AssertionItem & assn, ResnState & resn ) {
 		// skip unused assertions
 		if ( ! assn.info.isUsed ) return true;
@@ -274,6 +274,6 @@
 		// find the candidates that unify with the desired type
 		CandidateList matches;
-		for ( const auto& cdata : candidates ) {
-			DeclarationWithType* candidate = cdata.id;
+		for ( const auto & cdata : candidates ) {
+			const DeclarationWithType * candidate = cdata.id;
 
 			// build independent unification context for candidate
@@ -281,5 +281,5 @@
 			TypeEnvironment newEnv{ resn.alt.env };
 			OpenVarSet newOpenVars{ resn.alt.openVars };
-			Type* adjType = candidate->get_type()->clone();
+			Type * adjType = candidate->get_type()->clone();
 			adjustExprType( adjType, newEnv, resn.indexer );
 			renameTyVars( adjType );
@@ -370,6 +370,6 @@
 		return resKey;
 	}
-	
-	/// Replace resnSlots with inferParams and add alternative to output list, if meets pruning 
+
+	/// Replace resnSlots with inferParams and add alternative to output list, if meets pruning
 	/// threshold.
 	void finalizeAssertions( ResnState& resn, PruneMap & pruneThresholds, AltList& out ) {
@@ -406,5 +406,5 @@
 		ResnList resns{ ResnState{ alt, root_indexer } };
 		ResnList new_resns{};
-		
+
 		// Pruning thresholds by result type of the output alternatives.
 		// Alternatives *should* be generated in sorted order, so no need to retroactively prune
Index: src/ResolvExpr/Unify.cc
===================================================================
--- src/ResolvExpr/Unify.cc	(revision 8fd52e90372722cd58a940aabae4889d3072d17a)
+++ src/ResolvExpr/Unify.cc	(revision 6f096d2341e25591a9d9435e4a28725954748a7a)
@@ -102,9 +102,9 @@
 		WidenMode widen, const ast::SymbolTable & symtab );
 
-	bool typesCompatible( Type *first, Type *second, const SymTab::Indexer &indexer, const TypeEnvironment &env ) {
+	bool typesCompatible( const Type * first, const Type * second, const SymTab::Indexer & indexer, const TypeEnvironment & env ) {
 		TypeEnvironment newEnv;
 		OpenVarSet openVars, closedVars; // added closedVars
 		AssertionSet needAssertions, haveAssertions;
-		Type *newFirst = first->clone(), *newSecond = second->clone();
+		Type * newFirst = first->clone(), * newSecond = second->clone();
 		env.apply( newFirst );
 		env.apply( newSecond );
Index: src/ResolvExpr/typeops.h
===================================================================
--- src/ResolvExpr/typeops.h	(revision 8fd52e90372722cd58a940aabae4889d3072d17a)
+++ src/ResolvExpr/typeops.h	(revision 6f096d2341e25591a9d9435e4a28725954748a7a)
@@ -28,5 +28,8 @@
 #include "SynTree/SynTree.h"
 #include "SynTree/Type.h"
-#include "SymTab/Indexer.h"
+
+namespace SymTab {
+	class Indexer;
+}
 
 namespace ResolvExpr {
@@ -60,5 +63,5 @@
 	// in AdjustExprType.cc
 	/// Replaces array types with the equivalent pointer, and function types with a pointer-to-function
-	void adjustExprType( Type *&type, const TypeEnvironment &env, const SymTab::Indexer &indexer );
+	void adjustExprType( Type *& type, const TypeEnvironment & env, const SymTab::Indexer & indexer );
 
 	/// Replaces array types with the equivalent pointer, and function types with a pointer-to-function using empty TypeEnvironment and Indexer
@@ -66,5 +69,5 @@
 
 	template< typename ForwardIterator >
-	void adjustExprTypeList( ForwardIterator begin, ForwardIterator end, const TypeEnvironment &env, const SymTab::Indexer &indexer ) {
+	void adjustExprTypeList( ForwardIterator begin, ForwardIterator end, const TypeEnvironment & env, const SymTab::Indexer & indexer ) {
 		while ( begin != end ) {
 			adjustExprType( *begin++, env, indexer );
@@ -77,5 +80,5 @@
 
 	// in CastCost.cc
-	Cost castCost( const Type * src, const Type * dest, const SymTab::Indexer &indexer, const TypeEnvironment &env );
+	Cost castCost( const Type * src, const Type * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env );
 	Cost castCost(
 		const ast::Type * src, const ast::Type * dst, const ast::SymbolTable & symtab,
@@ -83,5 +86,5 @@
 
 	// in ConversionCost.cc
-	Cost conversionCost( const Type *src, const Type *dest, const SymTab::Indexer &indexer, const TypeEnvironment &env );
+	Cost conversionCost( const Type * src, const Type * dest, const SymTab::Indexer & indexer, const TypeEnvironment & env );
 	Cost conversionCost(
 		const ast::Type * src, const ast::Type * dst, const ast::SymbolTable & symtab,
@@ -89,14 +92,14 @@
 
 	// in AlternativeFinder.cc
-	Cost computeConversionCost( Type *actualType, Type *formalType,
-		const SymTab::Indexer &indexer, const TypeEnvironment &env );
+	Cost computeConversionCost( Type * actualType, Type * formalType,
+		const SymTab::Indexer & indexer, const TypeEnvironment & env );
 
 	// in PtrsAssignable.cc
-	int ptrsAssignable( const Type * src, const Type * dest, const TypeEnvironment &env );
+	int ptrsAssignable( const Type * src, const Type * dest, const TypeEnvironment & env );
 	int ptrsAssignable( const ast::Type * src, const ast::Type * dst,
 		const ast::TypeEnvironment & env );
 
 	// in PtrsCastable.cc
-	int ptrsCastable( const Type * src, const Type * dest, const TypeEnvironment &env, const SymTab::Indexer &indexer );
+	int ptrsCastable( const Type * src, const Type * dest, const TypeEnvironment & env, const SymTab::Indexer & indexer );
 	int ptrsCastable(
 		const ast::Type * src, const ast::Type * dst, const ast::SymbolTable & symtab,
@@ -104,13 +107,13 @@
 
 	// in Unify.cc
-	bool typesCompatible( Type *, Type *, const SymTab::Indexer &indexer, const TypeEnvironment &env );
-	bool typesCompatibleIgnoreQualifiers( const Type *, const Type *, const SymTab::Indexer &indexer, const TypeEnvironment &env );
-
-	inline bool typesCompatible( Type *t1, Type *t2, const SymTab::Indexer &indexer ) {
+	bool typesCompatible( const Type *, const Type *, const SymTab::Indexer & indexer, const TypeEnvironment & env );
+	bool typesCompatibleIgnoreQualifiers( const Type *, const Type *, const SymTab::Indexer & indexer, const TypeEnvironment & env );
+
+	inline bool typesCompatible( const Type * t1, const Type * t2, const SymTab::Indexer & indexer ) {
 		TypeEnvironment env;
 		return typesCompatible( t1, t2, indexer, env );
 	}
 
-	inline bool typesCompatibleIgnoreQualifiers( const Type * t1, const Type * t2, const SymTab::Indexer &indexer ) {
+	inline bool typesCompatibleIgnoreQualifiers( const Type * t1, const Type * t2, const SymTab::Indexer & indexer ) {
 		TypeEnvironment env;
 		return typesCompatibleIgnoreQualifiers( t1, t2, indexer, env );
@@ -131,5 +134,5 @@
 
 	// in CommonType.cc
-	Type * commonType( Type *type1, Type *type2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment &env, const OpenVarSet &openVars );
+	Type * commonType( Type * type1, Type * type2, bool widenFirst, bool widenSecond, const SymTab::Indexer & indexer, TypeEnvironment & env, const OpenVarSet & openVars );
 	ast::ptr< ast::Type > commonType(
 		const ast::ptr< ast::Type > & type1, const ast::ptr< ast::Type > & type2, WidenMode widen,
@@ -137,18 +140,18 @@
 
 	// in PolyCost.cc
-	int polyCost( Type *type, const TypeEnvironment &env, const SymTab::Indexer &indexer );
+	int polyCost( Type * type, const TypeEnvironment & env, const SymTab::Indexer & indexer );
 	int polyCost(
 		const ast::Type * type, const ast::SymbolTable & symtab, const ast::TypeEnvironment & env );
 
 	// in SpecCost.cc
-	int specCost( Type *type );
+	int specCost( Type * type );
 	int specCost( const ast::Type * type );
 
 	// in Occurs.cc
-	bool occurs( Type *type, std::string varName, const TypeEnvironment &env );
+	bool occurs( Type * type, std::string varName, const TypeEnvironment & env );
 	// new AST version in TypeEnvironment.cpp (only place it was used in old AST)
 
 	template<typename Iter>
-	bool occursIn( Type* ty, Iter begin, Iter end, const TypeEnvironment &env ) {
+	bool occursIn( Type* ty, Iter begin, Iter end, const TypeEnvironment & env ) {
 		while ( begin != end ) {
 			if ( occurs( ty, *begin, env ) ) return true;
@@ -197,5 +200,5 @@
 
 	// in TypeEnvironment.cc
-	bool isFtype( Type *type );
+	bool isFtype( Type * type );
 } // namespace ResolvExpr
 
