Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision e39241b40d9f33c51659b3a67958a8fb1a2141fa)
+++ src/CodeGen/CodeGenerator.cc	(revision 0f9bef3575f6b5dcfb3d73967a6f4243f09f9a01)
@@ -172,5 +172,5 @@
 	}
 
-	void CodeGenerator::handleAggregate( AggregateDecl * aggDecl ) {
+	void CodeGenerator::handleAggregate( AggregateDecl * aggDecl, const std::string & kind ) {
 		genAttributes( aggDecl->get_attributes() );
 
@@ -182,4 +182,5 @@
 		}
 
+		output << kind;
 		if ( aggDecl->get_name() != "" )
 			output << aggDecl->get_name();
@@ -204,12 +205,10 @@
 	void CodeGenerator::visit( StructDecl * structDecl ) {
 		extension( structDecl );
-		output << "struct ";
-		handleAggregate( structDecl );
+		handleAggregate( structDecl, "struct " );
 	}
 
 	void CodeGenerator::visit( UnionDecl * unionDecl ) {
 		extension( unionDecl );
-		output << "union ";
-		handleAggregate( unionDecl );
+		handleAggregate( unionDecl, "union " );
 	}
 
@@ -578,5 +577,6 @@
 		extension( memberExpr );
 		memberExpr->get_aggregate()->accept( *this );
-		output << "." << memberExpr->get_member();
+		output << ".";
+		memberExpr->get_member()->accept( *this );
 	}
 
Index: src/CodeGen/CodeGenerator.h
===================================================================
--- src/CodeGen/CodeGenerator.h	(revision e39241b40d9f33c51659b3a67958a8fb1a2141fa)
+++ src/CodeGen/CodeGenerator.h	(revision 0f9bef3575f6b5dcfb3d73967a6f4243f09f9a01)
@@ -125,5 +125,5 @@
 		void printDesignators( std::list< Expression * > & );
 		void handleStorageClass( DeclarationWithType *decl );
-		void handleAggregate( AggregateDecl *aggDecl );
+		void handleAggregate( AggregateDecl *aggDecl, const std::string & kind );
 		void handleTypedef( NamedTypeDecl *namedType );
 		std::string mangleName( DeclarationWithType * decl );
Index: src/CodeGen/GenType.cc
===================================================================
--- src/CodeGen/GenType.cc	(revision e39241b40d9f33c51659b3a67958a8fb1a2141fa)
+++ src/CodeGen/GenType.cc	(revision 0f9bef3575f6b5dcfb3d73967a6f4243f09f9a01)
@@ -186,4 +186,15 @@
 			funcType->get_returnVals().front()->get_type()->accept( *this );
 		} // if
+
+		// add forall
+		if( ! funcType->get_forall().empty() && ! genC ) {
+			// assertf( ! genC, "Aggregate type parameters should not reach code generation." );
+			std::ostringstream os;
+			CodeGenerator cg( os, pretty, genC );
+			os << "forall(";
+			cg.genCommaList( funcType->get_forall().begin(), funcType->get_forall().end() );
+			os << ")" << std::endl;
+			typeString = os.str() + typeString;
+		}
 	}
 
