Index: src/SymTab/FixFunction.h
===================================================================
--- src/SymTab/FixFunction.h	(revision 145f1fc837f3fe2237a52a1c4d10dfa54a209da5)
+++ src/SymTab/FixFunction.h	(revision 724c2b6f8ab60e02cc9a9c5872b23139ff804274)
@@ -20,4 +20,5 @@
 
 namespace SymTab {
+	/// Replaces function and array types by equivalent pointer types.
 	class FixFunction : public Mutator {
 		typedef Mutator Parent;
Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision 145f1fc837f3fe2237a52a1c4d10dfa54a209da5)
+++ src/SymTab/Validate.cc	(revision 724c2b6f8ab60e02cc9a9c5872b23139ff804274)
@@ -60,4 +60,5 @@
 	class HoistStruct : public Visitor {
 	  public:
+		/// Flattens nested struct types
 		static void hoistStruct( std::list< Declaration * > &translationUnit );
   
@@ -84,4 +85,5 @@
 	};
 
+	/// Replaces enum types by int, and function or array types in function parameter and return lists by appropriate pointers
 	class Pass1 : public Visitor {
 		typedef Visitor Parent;
@@ -89,5 +91,6 @@
 		virtual void visit( FunctionType *func );
 	};
-  
+
+	/// Associates forward declarations of aggregates with their definitions
 	class Pass2 : public Indexer {
 		typedef Indexer Parent;
@@ -110,4 +113,5 @@
 	};
 
+	/// Replaces array and function types in forall lists by appropriate pointer type
 	class Pass3 : public Indexer {
 		typedef Indexer Parent;
@@ -123,4 +127,5 @@
 	class AddStructAssignment : public Visitor {
 	  public:
+		/// Generates assignment operators for aggregate types as required
 		static void addStructAssignment( std::list< Declaration * > &translationUnit );
 
@@ -444,6 +449,6 @@
 	}
 
+	/// Fix up assertions
 	void forallFixer( Type *func ) {
-		// Fix up assertions
 		for ( std::list< TypeDecl * >::iterator type = func->get_forall().begin(); type != func->get_forall().end(); ++type ) {
 			std::list< DeclarationWithType * > toBeDone, nextRound;
@@ -817,4 +822,13 @@
 			Type *ret = def->second.first->get_base()->clone();
 			ret->get_qualifiers() += typeInst->get_qualifiers();
+			// place instance parameters on the typedef'd type
+			if ( ! typeInst->get_parameters().empty() ) {
+				ReferenceToType *rtt = dynamic_cast<ReferenceToType*>(ret);
+				if ( ! rtt ) {
+					throw SemanticError("cannot apply type parameters to base type of " + typeInst->get_name());
+				}
+				rtt->get_parameters().clear();
+				cloneAll(typeInst->get_parameters(), rtt->get_parameters());
+			}
 			delete typeInst;
 			return ret;
Index: src/SymTab/Validate.h
===================================================================
--- src/SymTab/Validate.h	(revision 145f1fc837f3fe2237a52a1c4d10dfa54a209da5)
+++ src/SymTab/Validate.h	(revision 724c2b6f8ab60e02cc9a9c5872b23139ff804274)
@@ -23,4 +23,5 @@
 	class Indexer;
 
+	/// Normalizes struct and function declarations
 	void validate( std::list< Declaration * > &translationUnit, bool doDebug = false );
 	void validateType( Type *type, const Indexer *indexer );
