Index: src/SynTree/ApplicationExpr.cc
===================================================================
--- src/SynTree/ApplicationExpr.cc	(revision d9fa60af0bc172d6842f414cb608e0615d3582a5)
+++ src/SynTree/ApplicationExpr.cc	(revision 2c57025b9dec0a2c5dae7c32ad6e1ac3ccf8f76e)
@@ -30,4 +30,5 @@
 	if ( &other == this ) return *this;
 	decl = other.decl;
+	// xxx - this looks like a memory leak
 	actualType = maybeClone( other.actualType );
 	formalType = maybeClone( other.formalType );
Index: src/SynTree/Declaration.h
===================================================================
--- src/SynTree/Declaration.h	(revision d9fa60af0bc172d6842f414cb608e0615d3582a5)
+++ src/SynTree/Declaration.h	(revision 2c57025b9dec0a2c5dae7c32ad6e1ac3ccf8f76e)
@@ -176,4 +176,14 @@
   public:
 	enum Kind { Any, Dtype, Ftype };
+	/// Data extracted from a type decl
+	struct Data {
+		TypeDecl::Kind kind;
+		bool isComplete;
+		Data() : kind( (TypeDecl::Kind)-1 ), isComplete( false ) {}
+		Data( TypeDecl * typeDecl ) : Data( typeDecl->get_kind(), typeDecl->isComplete() ) {}
+		Data( Kind kind, bool isComplete ) : kind( kind ), isComplete( isComplete ) {}
+		bool operator==(const Data & other) const { return kind == other.kind && isComplete == other.isComplete; }
+		bool operator!=(const Data & other) const { return !(*this == other);}
+	};
 
 	TypeDecl( const std::string &name, DeclarationNode::StorageClass sc, Type *type, Kind kind );
@@ -182,4 +192,8 @@
 	Kind get_kind() const { return kind; }
 
+	bool isComplete() const { return kind == Any || sized; }
+	bool get_sized() const { return sized; }
+	TypeDecl * set_sized( bool newValue ) { sized = newValue; return this; }
+
 	virtual TypeDecl *clone() const { return new TypeDecl( *this ); }
 	virtual void accept( Visitor &v ) { v.visit( this ); }
@@ -188,4 +202,5 @@
 	virtual std::string typeString() const;
 	Kind kind;
+	bool sized;
 };
 
@@ -280,4 +295,5 @@
 
 std::ostream & operator<<( std::ostream & out, const Declaration * decl );
+std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data );
 
 #endif // DECLARATION_H
Index: src/SynTree/ReferenceToType.cc
===================================================================
--- src/SynTree/ReferenceToType.cc	(revision d9fa60af0bc172d6842f414cb608e0615d3582a5)
+++ src/SynTree/ReferenceToType.cc	(revision 2c57025b9dec0a2c5dae7c32ad6e1ac3ccf8f76e)
@@ -128,4 +128,8 @@
 }
 
+TypeInstType::TypeInstType( const TypeInstType &other ) : Parent( other ), baseType( other.baseType ), isFtype( other.isFtype ) {
+}
+
+
 TypeInstType::~TypeInstType() {
 	// delete baseType; //This is shared and should not be deleted
Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision d9fa60af0bc172d6842f414cb608e0615d3582a5)
+++ src/SynTree/Type.h	(revision 2c57025b9dec0a2c5dae7c32ad6e1ac3ccf8f76e)
@@ -337,5 +337,5 @@
 	TypeInstType( const Type::Qualifiers &tq, const std::string &name, TypeDecl *baseType );
 	TypeInstType( const Type::Qualifiers &tq, const std::string &name, bool isFtype );
-	TypeInstType( const TypeInstType &other ) : Parent( other ), baseType( other.baseType ), isFtype( other.isFtype ) {}
+	TypeInstType( const TypeInstType &other );
 	~TypeInstType();
 
Index: src/SynTree/TypeDecl.cc
===================================================================
--- src/SynTree/TypeDecl.cc	(revision d9fa60af0bc172d6842f414cb608e0615d3582a5)
+++ src/SynTree/TypeDecl.cc	(revision 2c57025b9dec0a2c5dae7c32ad6e1ac3ccf8f76e)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// TypeDecl.cc -- 
+// TypeDecl.cc --
 //
 // Author           : Richard C. Bilson
@@ -18,8 +18,8 @@
 #include "Common/utility.h"
 
-TypeDecl::TypeDecl( const std::string &name, DeclarationNode::StorageClass sc, Type *type, Kind kind ) : Parent( name, sc, type ), kind( kind ) {
+TypeDecl::TypeDecl( const std::string &name, DeclarationNode::StorageClass sc, Type *type, Kind kind ) : Parent( name, sc, type ), kind( kind ), sized( kind == Any ) {
 }
 
-TypeDecl::TypeDecl( const TypeDecl &other ) : Parent( other ), kind( other.kind ) {
+TypeDecl::TypeDecl( const TypeDecl &other ) : Parent( other ), kind( other.kind ), sized( other.sized ) {
 }
 
@@ -29,4 +29,8 @@
 }
 
+std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data ) {
+  return os << data.kind << ", " << data.isComplete;
+}
+
 // Local Variables: //
 // tab-width: 4 //
