Index: src/AST/Type.cpp
===================================================================
--- src/AST/Type.cpp	(revision 53f4b555094e994044173ff395eae0f5a2e92085)
+++ src/AST/Type.cpp	(revision b5978caa09b89dab28be8fb0df96edaf8c009d7d)
@@ -167,7 +167,14 @@
 bool TypeInstType::isComplete() const { return base->sized; }
 
+static std::string toTypeString( int usage, int id, std::string const & name ) {
+	return "_" + std::to_string( usage ) + "_" + std::to_string( id ) + "_" + name;
+}
+
+std::string TypeInstType::typeString() const {
+	return ( 0 < formal_usage ) ? toTypeString( formal_usage, expr_id, name ) : name;
+}
+
 std::string TypeEnvKey::typeString() const {
-	return std::string("_") + std::to_string(formal_usage)
-		+ "_" + std::to_string(expr_id) + "_" + base->name;
+	return toTypeString( formal_usage, expr_id, base->name );
 }
 
Index: src/AST/Type.hpp
===================================================================
--- src/AST/Type.hpp	(revision 53f4b555094e994044173ff395eae0f5a2e92085)
+++ src/AST/Type.hpp	(revision b5978caa09b89dab28be8fb0df96edaf8c009d7d)
@@ -383,8 +383,5 @@
 	const Type * accept( Visitor & v ) const override { return v.visit( this ); }
 
-	std::string typeString() const {
-		if (formal_usage > 0) return std::string("_") + std::to_string(formal_usage) + "_" + std::to_string(expr_id) + "_" + name;
-		else return name;
-	}
+	std::string typeString() const;
 private:
 	TypeInstType * clone() const override { return new TypeInstType{ *this }; }
