Index: src/AST/Vector.hpp
===================================================================
--- src/AST/Vector.hpp	(revision bc899d6a44ef2923a2bd54f336bb656b8624bc30)
+++ src/AST/Vector.hpp	(revision bc899d6a44ef2923a2bd54f336bb656b8624bc30)
@@ -0,0 +1,34 @@
+//
+// 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.
+//
+// Vector.hpp -- Short hand for vector of ast pointers.
+//
+// Author           : Andrew Beach
+// Created On       : Thu Oct 20  9:46:00 2022
+// Last Modified By : Andrew Beach
+// Last Modified On : Thu Oct 20 10:16:00 2022
+// Update Count     : 0
+//
+
+#pragma once
+
+#include <vector>
+
+#include "AST/Node.hpp"
+
+namespace ast {
+
+/// Short hand for a vector of ast::ptr types.
+template<typename T, typename Alloc = std::allocator<ptr<T>> >
+using vector = std::vector<ptr<T>, Alloc>;
+
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/AST/module.mk
===================================================================
--- src/AST/module.mk	(revision d191e246fd6d1f8e4ff7e7d8cafe22bbd3d09639)
+++ src/AST/module.mk	(revision bc899d6a44ef2923a2bd54f336bb656b8624bc30)
@@ -67,4 +67,5 @@
 	AST/Util.cpp \
 	AST/Util.hpp \
+	AST/Vector.hpp \
 	AST/Visitor.hpp
 
Index: src/GenPoly/InstantiateGenericNew.cpp
===================================================================
--- src/GenPoly/InstantiateGenericNew.cpp	(revision d191e246fd6d1f8e4ff7e7d8cafe22bbd3d09639)
+++ src/GenPoly/InstantiateGenericNew.cpp	(revision bc899d6a44ef2923a2bd54f336bb656b8624bc30)
@@ -26,4 +26,5 @@
 #include "AST/Pass.hpp"                // for Pass, WithGuard, WithShortCi...
 #include "AST/TranslationUnit.hpp"     // for TranslationUnit
+#include "AST/Vector.hpp"              // for vector
 #include "CodeGen/OperatorTable.h"     // for isAssignment
 #include "Common/ScopedMap.h"          // for ScopedMap
@@ -39,17 +40,17 @@
 // Utilities:
 
-using type_vector = std::vector< ast::ptr< ast::TypeExpr > >;
+using type_vector = ast::vector< ast::TypeExpr >;
 
 /// Abstracts type equality for a list of parameter types.
 struct TypeList {
 	TypeList() : params() {}
-	TypeList( std::vector< ast::ptr< ast::Type > > const & params ) :
+	TypeList( ast::vector< ast::Type > const & params ) :
 		params( params ) {}
-	TypeList( std::vector< ast::ptr< ast::Type > > && params ) :
+	TypeList( ast::vector< ast::Type > && params ) :
 		params( std::move( params ) ) {}
 	TypeList( TypeList const & that ) : params( that.params ) {}
 	TypeList( TypeList && that ) : params( std::move( that.params ) ) {}
 
-	TypeList( std::vector< ast::ptr< ast::TypeExpr > > const & exprs ) :
+	TypeList( ast::vector< ast::TypeExpr > const & exprs ) :
 			params() {
 		for ( auto expr : exprs ) {
@@ -82,5 +83,5 @@
 	}
 
-	std::vector<ast::ptr<ast::Type>> params;
+	ast::vector<ast::Type> params;
 };
 
@@ -103,5 +104,6 @@
 	/// returns null if no such value exists.
 	ast::AggregateDecl const * lookup(
-			ast::AggregateDecl const * key, type_vector const & params ) const {
+			ast::AggregateDecl const * key,
+			type_vector const & params ) const {
 		// This type repackaging is used for the helpers.
 		ast::ptr<ast::AggregateDecl> ptr = key;
@@ -150,5 +152,5 @@
 }
 
-bool isDtypeStatic( std::vector<ast::ptr<ast::TypeDecl>> const & baseParams ) {
+bool isDtypeStatic( ast::vector<ast::TypeDecl> const & baseParams ) {
 	return std::all_of( baseParams.begin(), baseParams.end(),
 		[]( ast::TypeDecl const * td ){ return !td->isComplete(); }
@@ -161,7 +163,7 @@
 /// least one parameter type, and dynamic if there is no concrete instantiation.
 GenericType makeSubstitutions(
-		std::vector<ast::ptr<ast::TypeExpr>> & out,
-		std::vector<ast::ptr<ast::TypeDecl>> const & baseParams,
-		std::vector<ast::ptr<ast::Expr>> const & params ) {
+		ast::vector<ast::TypeExpr> & out,
+		ast::vector<ast::TypeDecl> const & baseParams,
+		ast::vector<ast::Expr> const & params ) {
 	GenericType gt = GenericType::dtypeStatic;
 
@@ -214,9 +216,9 @@
 /// Substitutes types of members according to baseParams => typeSubs,
 /// returning the result in a new vector.
-std::vector<ast::ptr<ast::Decl>> substituteMembers(
-		std::vector<ast::ptr<ast::Decl>> const & members,
-		std::vector<ast::ptr<ast::TypeDecl>> const & baseParams,
-		std::vector<ast::ptr<ast::TypeExpr>> const & typeSubs ) {
-	std::vector<ast::ptr<ast::Decl>> out;
+ast::vector<ast::Decl> substituteMembers(
+		ast::vector<ast::Decl> const & members,
+		ast::vector<ast::TypeDecl> const & baseParams,
+		ast::vector<ast::TypeExpr> const & typeSubs ) {
+	ast::vector<ast::Decl> out;
 	ast::TypeSubstitution subs( baseParams, typeSubs );
 	for ( ast::ptr<ast::Decl> const & member : members ) {
@@ -235,7 +237,7 @@
 /// modifying them in-place.
 void substituteMembersHere(
-		std::vector<ast::ptr<ast::Decl>> & members,
-		std::vector<ast::ptr<ast::TypeDecl>> const & baseParams,
-		std::vector<ast::ptr<ast::TypeExpr>> const & typeSubs ) {
+		ast::vector<ast::Decl> & members,
+		ast::vector<ast::TypeDecl> const & baseParams,
+		ast::vector<ast::TypeExpr> const & typeSubs ) {
 	ast::TypeSubstitution subs( baseParams, typeSubs );
 	for ( ast::ptr<ast::Decl> & member : members ) {
@@ -285,5 +287,5 @@
 
 	ast::Expr const * fixMemberExpr(
-		std::vector<ast::ptr<ast::TypeDecl>> const & baseParams,
+		ast::vector<ast::TypeDecl> const & baseParams,
 		ast::MemberExpr const * memberExpr );
 
@@ -349,5 +351,5 @@
 
 ast::Expr const * FixDtypeStatic::fixMemberExpr(
-		std::vector<ast::ptr<ast::TypeDecl>> const & baseParams,
+		ast::vector<ast::TypeDecl> const & baseParams,
 		ast::MemberExpr const * memberExpr ) {
 	// Need to cast dtype-static member expressions to their actual type
@@ -461,5 +463,5 @@
 		type_vector const & typeSubs, ast::UnionDecl const * decl );
 
-	void replaceParametersWithConcrete( std::vector<ast::ptr<ast::Expr>> & params );
+	void replaceParametersWithConcrete( ast::vector<ast::Expr> & params );
 	ast::Type const * replaceWithConcrete( ast::Type const * type, bool doClone );
 
@@ -470,6 +472,6 @@
 	/// marks it as stripped.
 	void stripDtypeParams( ast::AggregateDecl * base,
-		std::vector<ast::ptr<ast::TypeDecl>> & baseParams,
-		std::vector<ast::ptr<ast::TypeExpr>> const & typeSubs );
+		ast::vector<ast::TypeDecl> & baseParams,
+		ast::vector<ast::TypeExpr> const & typeSubs );
 };
 
@@ -511,5 +513,5 @@
 	// and put substitutions in typeSubs.
 	assertf( inst->base, "Base data-type has parameters." );
-	std::vector<ast::ptr<ast::TypeExpr>> typeSubs;
+	ast::vector<ast::TypeExpr> typeSubs;
 	GenericType gt = makeSubstitutions( typeSubs, inst->base->params, inst->params );
 	switch ( gt ) {
@@ -570,5 +572,5 @@
 		ast::AggregateDecl const * aggr =
 			expr->aggregate->result.strict_as<ast::BaseInstType>()->aggr();
-		std::vector<ast::ptr<ast::Decl>> const & members = aggr->members;
+		ast::vector<ast::Decl> const & members = aggr->members;
 		auto it = std::find( members.begin(), members.end(), expr->member );
 		memberIndex = std::distance( members.begin(), it );
@@ -643,5 +645,5 @@
 
 void GenericInstantiator::replaceParametersWithConcrete(
-		std::vector<ast::ptr<ast::Expr>> & params ) {
+		ast::vector<ast::Expr> & params ) {
 	for ( ast::ptr<ast::Expr> & param : params ) {
 		auto paramType = param.as<ast::TypeExpr>();
@@ -673,6 +675,6 @@
 void GenericInstantiator::stripDtypeParams(
 		ast::AggregateDecl * base,
-		std::vector<ast::ptr<ast::TypeDecl>> & baseParams,
-		std::vector<ast::ptr<ast::TypeExpr>> const & typeSubs ) {
+		ast::vector<ast::TypeDecl> & baseParams,
+		ast::vector<ast::TypeExpr> const & typeSubs ) {
 	substituteMembersHere( base->members, baseParams, typeSubs );
 
