Index: src/Concurrency/Keywords.cc
===================================================================
--- src/Concurrency/Keywords.cc	(revision a16764a6fbfe44300fc8834400a31c89befda091)
+++ src/Concurrency/Keywords.cc	(revision 9a705dc89354e53ad54ff8ee372e6cc20c210e1e)
@@ -53,10 +53,10 @@
 	  public:
 
-	  	ConcurrentSueKeyword( std::string&& type_name, std::string&& field_name, std::string&& getter_name, std::string&& context_error, bool needs_main ) :
-		  type_name( type_name ), field_name( field_name ), getter_name( getter_name ), context_error( context_error ), needs_main( needs_main ) {}
+	  	ConcurrentSueKeyword( std::string&& type_name, std::string&& field_name, std::string&& getter_name, std::string&& context_error, bool needs_main, KeywordCastExpr::Target cast_target ) :
+		  type_name( type_name ), field_name( field_name ), getter_name( getter_name ), context_error( context_error ), needs_main( needs_main ), cast_target( cast_target ) {}
 
 		virtual ~ConcurrentSueKeyword() {}
 
-		void postvisit( StructDecl * decl );
+		Declaration * postmutate( StructDecl * decl );
 
 		void handle( StructDecl * );
@@ -66,4 +66,6 @@
 
 		virtual bool is_target( StructDecl * decl ) = 0;
+
+		Expression * postmutate( KeywordCastExpr * cast );
 
 	  private:
@@ -73,4 +75,5 @@
 		const std::string context_error;
 		bool needs_main;
+		KeywordCastExpr::Target cast_target;
 
 		StructDecl* type_decl = nullptr;
@@ -95,5 +98,6 @@
 			"get_thread",
 			"thread keyword requires threads to be in scope, add #include <thread>",
-			true
+			true,
+			KeywordCastExpr::Thread
 		)
 		{}
@@ -105,5 +109,5 @@
 		static void implement( std::list< Declaration * > & translationUnit ) {
 			PassVisitor< ThreadKeyword > impl;
-			acceptAll( translationUnit, impl );
+			mutateAll( translationUnit, impl );
 		}
 	};
@@ -126,5 +130,6 @@
 			"get_coroutine",
 			"coroutine keyword requires coroutines to be in scope, add #include <coroutine>",
-			true
+			true,
+			KeywordCastExpr::Coroutine
 		)
 		{}
@@ -136,5 +141,5 @@
 		static void implement( std::list< Declaration * > & translationUnit ) {
 			PassVisitor< CoroutineKeyword > impl;
-			acceptAll( translationUnit, impl );
+			mutateAll( translationUnit, impl );
 		}
 	};
@@ -157,5 +162,6 @@
 			"get_monitor",
 			"monitor keyword requires monitors to be in scope, add #include <monitor>",
-			false
+			false,
+			KeywordCastExpr::Monitor
 		)
 		{}
@@ -167,5 +173,5 @@
 		static void implement( std::list< Declaration * > & translationUnit ) {
 			PassVisitor< MonitorKeyword > impl;
-			acceptAll( translationUnit, impl );
+			mutateAll( translationUnit, impl );
 		}
 	};
@@ -267,5 +273,5 @@
 	}
 
-	void ConcurrentSueKeyword::postvisit(StructDecl * decl) {
+	Declaration * ConcurrentSueKeyword::postmutate(StructDecl * decl) {
 		if( decl->name == type_name && decl->body ) {
 			assert( !type_decl );
@@ -275,5 +281,26 @@
 			handle( decl );
 		}
-	}
+		return decl;
+	}
+
+	Expression * ConcurrentSueKeyword::postmutate( KeywordCastExpr * cast ) {
+		if ( cast_target == cast->target ) {
+			// convert (thread &)t to (thread_desc &)*get_thread(t), etc.
+			if( !type_decl ) SemanticError( cast, context_error );
+			Expression * arg = cast->arg;
+			cast->arg = nullptr;
+			delete cast;
+			return new CastExpr(
+				UntypedExpr::createDeref(
+					new UntypedExpr( new NameExpr( getter_name ), { arg } )
+				),
+				new ReferenceType(
+					noQualifiers,
+					new StructInstType( noQualifiers, type_decl ) )
+				);
+		}
+		return cast;
+	}
+
 
 	void ConcurrentSueKeyword::handle( StructDecl * decl ) {
