Index: src/Tuples/TupleExpansion.cc
===================================================================
--- src/Tuples/TupleExpansion.cc	(revision a64644c8182e47ed436d2d8d7dd8ea0e08ce8362)
+++ src/Tuples/TupleExpansion.cc	(revision 64eae5636740bd0793ff27432eb02ade2386bec3)
@@ -318,4 +318,13 @@
 	}
 
+	TypeInstType * isTtype( Type * type ) {
+		if ( TypeInstType * inst = dynamic_cast< TypeInstType * >( type ) ) {
+			if ( inst->get_baseType()->get_kind() == TypeDecl::Ttype ) {
+				return inst;
+			}
+		}
+		return nullptr;
+	}
+
 	namespace {
 		/// determines if impurity (read: side-effects) may exist in a piece of code. Currently gives a very crude approximation, wherein any function call expression means the code may be impure
Index: src/Tuples/Tuples.h
===================================================================
--- src/Tuples/Tuples.h	(revision a64644c8182e47ed436d2d8d7dd8ea0e08ce8362)
+++ src/Tuples/Tuples.h	(revision 64eae5636740bd0793ff27432eb02ade2386bec3)
@@ -42,4 +42,7 @@
 	Type * makeTupleType( const std::list< Expression * > & exprs );
 
+	/// returns a TypeInstType if `type` is a ttype, nullptr otherwise
+	TypeInstType * isTtype( Type * type );
+
 	/// returns true if the expression may contain side-effects.
 	bool maybeImpure( Expression * expr );
