Index: src/Concurrency/Keywords.cc
===================================================================
--- src/Concurrency/Keywords.cc	(revision e1f7eefc84701acc2af857cd1c484e5650e81cba)
+++ src/Concurrency/Keywords.cc	(revision 0c13238b5b884bbd89f602258bdd1d13c4600011)
@@ -575,5 +575,5 @@
 
 		//in reverse order :
-		// monitor_guard_t __guard = { __monitors, #, func };
+		// monitor_dtor_guard_t __guard = { __monitors, func };
 		body->push_front(
 			new DeclStmt( new ObjectDecl(
@@ -634,5 +634,5 @@
 		assert(generic_func);
 
-		//in reverse order :
+		// in reverse order :
 		// monitor_guard_t __guard = { __monitors, #, func };
 		body->push_front(
Index: src/Concurrency/Waitfor.cc
===================================================================
--- src/Concurrency/Waitfor.cc	(revision e1f7eefc84701acc2af857cd1c484e5650e81cba)
+++ src/Concurrency/Waitfor.cc	(revision 0c13238b5b884bbd89f602258bdd1d13c4600011)
@@ -66,33 +66,34 @@
 void foo() {
 	while( true ) {
-
-		acceptable_t acceptables[3];
-		if( a < 1 ) {
-			acceptables[0].func = f;
-			acceptables[0].mon = a;
-		}
-		acceptables[1].func = g;
-		acceptables[1].mon = a;
-
-		acceptables[2].func = f;
-		acceptables[2].mon = a;
-		acceptables[2].is_dtor = true;
-
-		int ret = waitfor_internal( acceptables, swagl() );
-
-		switch( ret ) {
-			case 0:
-			{
-				bar();
+		{
+			acceptable_t acceptables[3];
+			if( a < 1 ) {
+				acceptables[0].func = f;
+				acceptables[0].mon = a;
 			}
-			case 1:
-			{
-				baz();
+			acceptables[1].func = g;
+			acceptables[1].mon = a;
+
+			acceptables[2].func = f;
+			acceptables[2].mon = a;
+			acceptables[2].is_dtor = true;
+
+			int ret = waitfor_internal( acceptables, swagl() );
+
+			switch( ret ) {
+				case 0:
+				{
+					bar();
+				}
+				case 1:
+				{
+					baz();
+				}
+				case 2:
+					signal(a);
+					{
+						break;
+					}
 			}
-			case 2:
-				signal(a);
-				{
-					break;
-				}
 		}
 	}
@@ -555,9 +556,11 @@
 					new ConstantExpr( Constant::from_ulong( i++ ) ),
 					{
-						clause.statement,
-						new BranchStmt(
-							"",
-							BranchStmt::Break
-						)
+						new CompoundStmt({
+							clause.statement,
+							new BranchStmt(
+								"",
+								BranchStmt::Break
+							)
+						})
 					}
 				)
@@ -570,9 +573,11 @@
 					new ConstantExpr( Constant::from_int( -2 ) ),
 					{
-						waitfor->timeout.statement,
-						new BranchStmt(
-							"",
-							BranchStmt::Break
-						)
+						new CompoundStmt({
+							waitfor->timeout.statement,
+							new BranchStmt(
+								"",
+								BranchStmt::Break
+							)
+						})
 					}
 				)
@@ -585,9 +590,11 @@
 					new ConstantExpr( Constant::from_int( -1 ) ),
 					{
-						waitfor->orelse.statement,
-						new BranchStmt(
-							"",
-							BranchStmt::Break
-						)
+						new CompoundStmt({
+							waitfor->orelse.statement,
+							new BranchStmt(
+								"",
+								BranchStmt::Break
+							)
+						})
 					}
 				)
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision e1f7eefc84701acc2af857cd1c484e5650e81cba)
+++ src/Parser/TypeData.cc	(revision 0c13238b5b884bbd89f602258bdd1d13c4600011)
@@ -322,5 +322,5 @@
 			function.params->printList( os, indent + 4 );
 		} else {
-			os << string( indent + 2, ' ' ) << "with no parameters " << endl;
+			os << string( indent + 2, ' ' ) << "with no parameters" << endl;
 		} // if
 		if ( function.idList ) {
@@ -347,17 +347,17 @@
 		os << DeclarationNode::aggregateNames[ aggregate.kind ] << ' ' << *aggregate.name << endl;
 		if ( aggregate.params ) {
-			os << string( indent + 2, ' ' ) << "with type parameters " << endl;
+			os << string( indent + 2, ' ' ) << "with type parameters" << endl;
 			aggregate.params->printList( os, indent + 4 );
 		} // if
 		if ( aggregate.actuals ) {
-			os << string( indent + 2, ' ' ) << "instantiated with actual parameters " << endl;
+			os << string( indent + 2, ' ' ) << "instantiated with actual parameters" << endl;
 			aggregate.actuals->printList( os, indent + 4 );
 		} // if
 		if ( aggregate.fields ) {
-			os << string( indent + 2, ' ' ) << "with members " << endl;
+			os << string( indent + 2, ' ' ) << "with members" << endl;
 			aggregate.fields->printList( os, indent + 4 );
 		} // if
 		if ( aggregate.body ) {
-			os << string( indent + 2, ' ' ) << " with body " << endl;
+			os << string( indent + 2, ' ' ) << " with body" << endl;
 		} // if
 		break;
@@ -370,5 +370,5 @@
 		} // if
 		if ( aggInst.params ) {
-			os << string( indent + 2, ' ' ) << "with parameters " << endl;
+			os << string( indent + 2, ' ' ) << "with parameters" << endl;
 			aggInst.params->printList( os, indent + 2 );
 		} // if
@@ -381,5 +381,5 @@
 		} // if
 		if ( enumeration.body ) {
-			os << string( indent + 2, ' ' ) << " with body " << endl;
+			os << string( indent + 2, ' ' ) << " with body" << endl;
 		} // if
 		break;
@@ -418,5 +418,5 @@
 		os << "tuple ";
 		if ( tuple ) {
-			os << "with members " << endl;
+			os << "with members" << endl;
 			tuple->printList( os, indent + 2 );
 		} // if
@@ -942,5 +942,5 @@
 	assert( td->typeexpr );
 	// assert( td->typeexpr->expr );
-	return new TypeofType{ 
+	return new TypeofType{
 		buildQualifiers( td ), td->typeexpr->build(), td->kind == TypeData::Basetypeof };
 } // buildTypeof
Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision e1f7eefc84701acc2af857cd1c484e5650e81cba)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 0c13238b5b884bbd89f602258bdd1d13c4600011)
@@ -474,8 +474,11 @@
 		}
 
-		// mark specialization cost of return types
-		for ( DeclarationWithType* returnVal : function->returnVals ) {
-			convCost.decSpec( specCost( returnVal->get_type() ) );
-		}
+		// 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:
+		//
+		//   forall(otype OS) {
+		//     void ?|?(OS&, int);  // with newline
+		//     OS&  ?|?(OS&, int);  // no newline, always chosen due to more specialization
+		//   }
 
 		// mark type variable and specialization cost of forall clause
@@ -483,9 +486,4 @@
 		for ( TypeDecl* td : function->forall ) {
 			convCost.decSpec( td->assertions.size() );
-		}
-
-		// xxx -- replace with new costs in resolver
-		for ( InferredParams::const_iterator assert = appExpr->inferParams.begin(); assert != appExpr->inferParams.end(); ++assert ) {
-			convCost += computeConversionCost( assert->second.actualType, assert->second.formalType, indexer, alt.env );
 		}
 
@@ -1229,5 +1227,5 @@
 				Alternative newAlt{ 
 					restructureCast( alt.expr->clone(), toType, castExpr->isGenerated ), 
-					alt.env, openVars, needAssertions, alt.cost + thisCost, thisCost };
+					alt.env, openVars, needAssertions, alt.cost, alt.cost + thisCost };
 				inferParameters( newAlt, back_inserter( candidates ) );
 			} // if
Index: src/SynTree/Expression.cc
===================================================================
--- src/SynTree/Expression.cc	(revision e1f7eefc84701acc2af857cd1c484e5650e81cba)
+++ src/SynTree/Expression.cc	(revision 0c13238b5b884bbd89f602258bdd1d13c4600011)
@@ -456,8 +456,8 @@
 
 void UntypedExpr::print( std::ostream &os, Indenter indent ) const {
-	os << "Applying untyped: " << std::endl;
+	os << "Applying untyped:" << std::endl;
 	os << indent+1;
 	function->print(os, indent+1);
-	os << std::endl << indent << "...to: " << std::endl;
+	os << std::endl << indent << "...to:" << std::endl;
 	printAll(args, os, indent+1);
 	Expression::print( os, indent );
Index: src/SynTree/ReferenceToType.cc
===================================================================
--- src/SynTree/ReferenceToType.cc	(revision e1f7eefc84701acc2af857cd1c484e5650e81cba)
+++ src/SynTree/ReferenceToType.cc	(revision 0c13238b5b884bbd89f602258bdd1d13c4600011)
@@ -205,5 +205,5 @@
 
 	Type::print( os, indent );
-	os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type) ";
+	os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type)";
 	if ( ! parameters.empty() ) {
 		os << endl << indent << "... with parameters" << endl;
Index: src/SynTree/Type.cc
===================================================================
--- src/SynTree/Type.cc	(revision e1f7eefc84701acc2af857cd1c484e5650e81cba)
+++ src/SynTree/Type.cc	(revision 0c13238b5b884bbd89f602258bdd1d13c4600011)
@@ -118,5 +118,5 @@
 
 void QualifiedType::print( std::ostream & os, Indenter indent ) const {
-	os << "Qualified Type: " << endl;
+	os << "Qualified Type:" << endl;
 	os << indent+1;
 	parent->print( os, indent+1 );
Index: src/main.cc
===================================================================
--- src/main.cc	(revision e1f7eefc84701acc2af857cd1c484e5650e81cba)
+++ src/main.cc	(revision 0c13238b5b884bbd89f602258bdd1d13c4600011)
@@ -10,6 +10,6 @@
 // Created On       : Fri May 15 23:12:02 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Jun  6 15:51:47 2018
-// Update Count     : 498
+// Last Modified On : Wed Dec 26 08:11:19 2018
+// Update Count     : 499
 //
 
@@ -371,5 +371,5 @@
 			}
 		} catch(const std::exception& e) {
-			std::cerr << "Unaught Exception \"" << e.what() << "\"\n";
+			std::cerr << "Uncaught Exception \"" << e.what() << "\"\n";
 		}
 		return 1;
