Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision cc5cc27711f848c820ed0de9ac1b5f643d4d011f)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 2595df1121a07bbced265ffd73c766dcca714ad6)
@@ -131,31 +131,16 @@
 
 	void printAlts( const AltList &list, std::ostream &os, unsigned int indentAmt ) {
-		Indenter indent = { indentAmt };
-
-		std::vector<int> idx;
-		idx.reserve(list.size());
-		for(int i = 0; i < list.size(); i++) { idx.push_back(i); }
-
-		std::sort(idx.begin(), idx.end(), [&list](int lhs_idx, int rhs_idx) -> bool {
-			const auto & lhs = list.at(lhs_idx);
-			const auto & rhs = list.at(rhs_idx);
-			if(lhs.expr->location.startsBefore(rhs.expr->location)) return true;
-			if(rhs.expr->location.startsBefore(lhs.expr->location)) return false;
-
-			if(lhs.env.size() < rhs.env.size()) return true;
-			if(lhs.env.size() > rhs.env.size()) return false;
-
-			if(lhs.openVars.size() < rhs.openVars.size()) return true;
-			if(lhs.openVars.size() > rhs.openVars.size()) return false;
-
-			if(lhs.need.size() < rhs.need.size()) return true;
-			if(lhs.need.size() > rhs.need.size()) return false;
-
-			return false;
-		});
-
-		for ( AltList::const_iterator i = list.begin(); i != list.end(); ++i ) {
-			i->print( os, indent );
-			os << std::endl;
+		std::vector<std::string> sorted;
+		sorted.reserve(list.size());
+		for(const auto & c : list) {
+			std::stringstream ss;
+			print( ss, *c, indentAmt );
+			sorted.push_back(ss.str());
+		}
+
+		std::sort(sorted.begin(), sorted.end());
+
+		for ( const auto & s : sorted ) {
+			os << s << std::endl;
 		}
 	}
Index: src/ResolvExpr/Candidate.cpp
===================================================================
--- src/ResolvExpr/Candidate.cpp	(revision cc5cc27711f848c820ed0de9ac1b5f643d4d011f)
+++ src/ResolvExpr/Candidate.cpp	(revision 2595df1121a07bbced265ffd73c766dcca714ad6)
@@ -41,7 +41,16 @@
 
 void print( std::ostream & os, const CandidateList & cands, Indenter indent ) {
-	for ( const CandidateRef & cand : cands ) {
-		print( os, *cand, indent );
-		os << std::endl;
+	std::vector<std::string> sorted;
+	sorted.reserve(cands.size());
+	for(const auto & c : cands) {
+		std::stringstream ss;
+		print( ss, *c, indent );
+		sorted.push_back(ss.str());
+	}
+
+	std::sort(sorted.begin(), sorted.end());
+
+	for ( const auto & s : sorted ) {
+		os << s << std::endl;
 	}
 }
Index: tests/.expect/castError.nast.txt
===================================================================
--- tests/.expect/castError.nast.txt	(revision cc5cc27711f848c820ed0de9ac1b5f643d4d011f)
+++ tests/.expect/castError.nast.txt	(revision 2595df1121a07bbced265ffd73c766dcca714ad6)
@@ -7,7 +7,7 @@
   char Alternatives are:
 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
-      Variable Expression: f: signed int
+      Variable Expression: f: double
       ... with resolved type:
-        signed int
+        double
     ... to:
       char
@@ -39,7 +39,7 @@
 
 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
-      Variable Expression: f: double
+      Variable Expression: f: signed int
       ... with resolved type:
-        double
+        signed int
     ... to:
       char
Index: tests/errors/.expect/completeType.nast.x64.txt
===================================================================
--- tests/errors/.expect/completeType.nast.x64.txt	(revision cc5cc27711f848c820ed0de9ac1b5f643d4d011f)
+++ tests/errors/.expect/completeType.nast.x64.txt	(revision 2595df1121a07bbced265ffd73c766dcca714ad6)
@@ -9,4 +9,39 @@
 ... with resolved type:
   void Alternatives are:
+Cost ( 0, 1, 2, 0, 1, -1, 0 ): Generated Cast of:
+      Application of
+        Variable Expression: *?: forall
+          DT: data type
+          function
+        ... with parameters
+          pointer to instance of type DT (not function type)
+        ... returning
+          reference to instance of type DT (not function type)
+
+        ... with resolved type:
+          pointer to forall
+            [unbound]:data type
+            function
+          ... with parameters
+            pointer to instance of type [unbound] (not function type)
+          ... returning
+            reference to instance of type [unbound] (not function type)
+
+        ... to arguments
+        Variable Expression: x: pointer to instance of struct A without body
+        ... with resolved type:
+          pointer to instance of struct A without body
+
+      ... with resolved type:
+        reference to instance of struct A without body
+    ... to: nothing
+    ... with resolved type:
+      void
+  (types:
+    void
+  )
+  Environment:([unbound]) -> instance of struct A without body (no widening)
+
+
 Cost ( 0, 1, 2, 0, 1, -1, 0 ): Generated Cast of:
       Application of
@@ -42,39 +77,4 @@
   )
   Environment:([unbound]) -> instance of struct B with body (no widening)
-
-
-Cost ( 0, 1, 2, 0, 1, -1, 0 ): Generated Cast of:
-      Application of
-        Variable Expression: *?: forall
-          DT: data type
-          function
-        ... with parameters
-          pointer to instance of type DT (not function type)
-        ... returning
-          reference to instance of type DT (not function type)
-
-        ... with resolved type:
-          pointer to forall
-            [unbound]:data type
-            function
-          ... with parameters
-            pointer to instance of type [unbound] (not function type)
-          ... returning
-            reference to instance of type [unbound] (not function type)
-
-        ... to arguments
-        Variable Expression: x: pointer to instance of struct A without body
-        ... with resolved type:
-          pointer to instance of struct A without body
-
-      ... with resolved type:
-        reference to instance of struct A without body
-    ... to: nothing
-    ... with resolved type:
-      void
-  (types:
-    void
-  )
-  Environment:([unbound]) -> instance of struct A without body (no widening)
 
 
Index: tests/meta/.expect/archVast.nast.x64.txt
===================================================================
--- tests/meta/.expect/archVast.nast.x64.txt	(revision cc5cc27711f848c820ed0de9ac1b5f643d4d011f)
+++ tests/meta/.expect/archVast.nast.x64.txt	(revision 2595df1121a07bbced265ffd73c766dcca714ad6)
@@ -7,7 +7,7 @@
   char Alternatives are:
 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
-      Variable Expression: FX64: signed int
+      Variable Expression: FX64: double
       ... with resolved type:
-        signed int
+        double
     ... to:
       char
@@ -39,7 +39,7 @@
 
 Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
-      Variable Expression: FX64: double
+      Variable Expression: FX64: signed int
       ... with resolved type:
-        double
+        signed int
     ... to:
       char
