Index: libcfa/src/collections/string.cfa
===================================================================
--- libcfa/src/collections/string.cfa	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ libcfa/src/collections/string.cfa	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -10,6 +10,6 @@
 // Created On       : Fri Sep 03 11:00:00 2021
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb  7 21:17:06 2024
-// Update Count     : 259
+// Last Modified On : Mon Apr 15 21:56:28 2024
+// Update Count     : 260
 //
 
@@ -198,6 +198,5 @@
 	cstr[len] = '\0';									// terminate
 	_Ostream_Manip(const char *) cf @= { cstr, f.wd, f.pc, f.base, {f.all} };
-	os | cf | nonl;
-	return os;
+	return os | cf | nonl;
 } // ?|?
 
Index: libcfa/src/collections/string_res.cfa
===================================================================
--- libcfa/src/collections/string_res.cfa	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ libcfa/src/collections/string_res.cfa	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -10,6 +10,6 @@
 // Created On       : Fri Sep 03 11:00:00 2021
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Feb 10 17:47:22 2024
-// Update Count     : 83
+// Last Modified On : Mon Apr 15 21:56:27 2024
+// Update Count     : 85
 //
 
@@ -200,6 +200,5 @@
 ofstream & ?|?(ofstream & out, const string_res & s) {
 	// CFA string is NOT null terminated, so print exactly lnth characters in a minimum width of 0.
-	out | wd( 0, s.Handle.lnth, s.Handle.s ) | nonl;
-	return out;
+	return out | wd( 0, s.Handle.lnth, s.Handle.s ) | nonl;
 }
 
Index: libcfa/src/stdlib.hfa
===================================================================
--- libcfa/src/stdlib.hfa	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ libcfa/src/stdlib.hfa	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Apr 12 07:39:15 2024
-// Update Count     : 812
+// Last Modified On : Mon Apr 15 22:11:51 2024
+// Update Count     : 817
 //
 
@@ -64,12 +64,17 @@
 	} // calloc
 
-	T * resize( T * ptr, size_t size ) {				// CFA resize, eliminate return-type cast
+	T * resize( T * ptr, size_t size ) {				// CFA resize
 		if ( _Alignof(T) <= libAlign() ) return (T *)resize( (void *)ptr, size ); // CFA resize
 		else return (T *)resize( (void *)ptr, _Alignof(T), size ); // CFA resize
 	} // resize
 
-	T * realloc( T * ptr, size_t size ) {				// CFA realloc, eliminate return-type cast
+	T * realloc( T * ptr, size_t size ) {				// CFA realloc
 		if ( _Alignof(T) <= libAlign() ) return (T *)realloc( (void *)ptr, size ); // C realloc
 		else return (T *)realloc( (void *)ptr, _Alignof(T), size ); // CFA realloc
+	} // realloc
+
+	T * reallocarray( T * ptr, size_t dim ) {			// CFA reallocarray
+		if ( _Alignof(T) <= libAlign() ) return (T *)reallocarray( (void *)ptr, dim, sizeof(T) ); // C reallocarray
+		else return (T *)reallocarray( (void *)ptr, _Alignof(T), dim ); // CFA reallocarray
 	} // realloc
 
@@ -210,5 +215,5 @@
 	} // alloc_internal$
 
-	forall( TT... | { T * alloc_internal$( void *, T *, size_t, size_t, S_fill(T), TT ); } ) {
+	forall( TT ... | { T * alloc_internal$( void *, T *, size_t, size_t, S_fill(T), TT ); } ) {
 		T * alloc_internal$( void *, T *, size_t Align, size_t Dim, S_fill(T) Fill, T_resize Resize, TT rest ) {
 	        return alloc_internal$( Resize, (T*)0p, Align, Dim, Fill, rest);
@@ -262,5 +267,5 @@
 	free( (void *)ptr );								// C free
 } // free
-static inline forall( T &, TT... | { void free( TT ); } )
+static inline forall( T &, TT ... | { void free( TT ); } )
 void free( T * ptr, TT rest ) {
 	free( ptr );
@@ -269,5 +274,5 @@
 
 // CFA allocation/deallocation and constructor/destructor, non-array types
-static inline forall( T & | sized(T), TT... | { void ?{}( T &, TT ); } )
+static inline forall( T & | sized(T), TT ... | { void ?{}( T &, TT ); } )
 T * new( TT p ) {
 	return &(*(T *)malloc()){ p };						// run constructor
@@ -282,5 +287,5 @@
 	free( ptr );										// always call free
 } // delete
-static inline forall( T &, TT... | { void ^?{}( T & ); void delete( TT ); } )
+static inline forall( T &, TT ... | { void ^?{}( T & ); void delete( TT ); } )
 void delete( T * ptr, TT rest ) {
 	delete( ptr );
@@ -289,7 +294,7 @@
 
 // CFA allocation/deallocation and constructor/destructor, array types
-forall( T & | sized(T), TT... | { void ?{}( T &, TT ); } ) T * anew( size_t dim, TT p );
+forall( T & | sized(T), TT ... | { void ?{}( T &, TT ); } ) T * anew( size_t dim, TT p );
 forall( T & | sized(T) | { void ^?{}( T & ); } ) void adelete( T arr[] );
-forall( T & | sized(T) | { void ^?{}( T & ); }, TT... | { void adelete( TT ); } ) void adelete( T arr[], TT rest );
+forall( T & | sized(T) | { void ^?{}( T & ); }, TT ... | { void adelete( TT ); } ) void adelete( T arr[], TT rest );
 //---------------------------------------
 
Index: libcfa/src/time.hfa
===================================================================
--- libcfa/src/time.hfa	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ libcfa/src/time.hfa	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -10,6 +10,6 @@
 // Created On       : Wed Mar 14 23:18:57 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Oct  8 09:07:48 2022
-// Update Count     : 668
+// Last Modified On : Thu Apr 18 12:07:21 2024
+// Update Count     : 670
 //
 
@@ -84,10 +84,10 @@
 	Duration ?`m( int64_t min ) { return (Duration)@{ min * (60LL * TIMEGRAN) }; }
 	Duration ?`m( double min ) { return (Duration)@{ min * (60LL * TIMEGRAN) }; }
-	Duration ?`h( int64_t hours ) { return (Duration)@{ hours * (60LL * 60LL * TIMEGRAN) }; }
-	Duration ?`h( double hours ) { return (Duration)@{ hours * (60LL * 60LL * TIMEGRAN) }; }
-	Duration ?`d( int64_t days ) { return (Duration)@{ days * (24LL * 60LL * 60LL * TIMEGRAN) }; }
-	Duration ?`d( double days ) { return (Duration)@{ days * (24LL * 60LL * 60LL * TIMEGRAN) }; }
-	Duration ?`w( int64_t weeks ) { return (Duration)@{ weeks * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
-	Duration ?`w( double weeks ) { return (Duration)@{ weeks * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
+	Duration ?`h( int64_t hour ) { return (Duration)@{ hour * (60LL * 60LL * TIMEGRAN) }; }
+	Duration ?`h( double hour ) { return (Duration)@{ hour * (60LL * 60LL * TIMEGRAN) }; }
+	Duration ?`d( int64_t day ) { return (Duration)@{ day * (24LL * 60LL * 60LL * TIMEGRAN) }; }
+	Duration ?`d( double day ) { return (Duration)@{ day * (24LL * 60LL * 60LL * TIMEGRAN) }; }
+	Duration ?`w( int64_t week ) { return (Duration)@{ week * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
+	Duration ?`w( double week ) { return (Duration)@{ week * (7LL * 24LL * 60LL * 60LL * TIMEGRAN) }; }
 
 	int64_t ?`ns( Duration dur ) { return dur.tn; }
Index: src/AST/BasicKind.hpp
===================================================================
--- src/AST/BasicKind.hpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
+++ src/AST/BasicKind.hpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -0,0 +1,64 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// BasicKind.hpp -- Declares all kinds of basic types.
+//
+// Author           : Andrew Beach
+// Created On       : Thu Apr 18 14:00:00 2024
+// Last Modified By : Andrew Beach
+// Last Modified On : Thu Apr 18 14:00:00 2024
+// Update Count     : 0
+//
+
+#pragma once
+
+namespace ast {
+
+// GENERATED START, DO NOT EDIT
+// GENERATED BY BasicTypes-gen.cc
+enum BasicKind {
+	Bool,
+	Char,
+	SignedChar,
+	UnsignedChar,
+	ShortSignedInt,
+	ShortUnsignedInt,
+	SignedInt,
+	UnsignedInt,
+	LongSignedInt,
+	LongUnsignedInt,
+	LongLongSignedInt,
+	LongLongUnsignedInt,
+	SignedInt128,
+	UnsignedInt128,
+	uFloat16,
+	uFloat16Complex,
+	uFloat32,
+	uFloat32Complex,
+	Float,
+	FloatComplex,
+	uFloat32x,
+	uFloat32xComplex,
+	uFloat64,
+	uFloat64Complex,
+	Double,
+	DoubleComplex,
+	uFloat64x,
+	uFloat64xComplex,
+	uuFloat80,
+	uFloat128,
+	uFloat128Complex,
+	uuFloat128,
+	LongDouble,
+	LongDoubleComplex,
+	uFloat128x,
+	uFloat128xComplex,
+	NUMBER_OF_BASIC_TYPES,
+	MAX_INTEGER_TYPE = UnsignedInt128,
+};
+// GENERATED END
+
+}
Index: src/AST/Expr.cpp
===================================================================
--- src/AST/Expr.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/AST/Expr.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -246,20 +246,20 @@
 ConstantExpr * ConstantExpr::from_bool( const CodeLocation & loc, bool b ) {
 	return new ConstantExpr{
-		loc, new BasicType{ BasicType::Bool }, b ? "1" : "0", (unsigned long long)b };
+		loc, new BasicType{ BasicKind::Bool }, b ? "1" : "0", (unsigned long long)b };
 }
 
 ConstantExpr * ConstantExpr::from_int( const CodeLocation & loc, int i ) {
 	return new ConstantExpr{
-		loc, new BasicType{ BasicType::SignedInt }, std::to_string( i ), (unsigned long long)i };
+		loc, new BasicType{ BasicKind::SignedInt }, std::to_string( i ), (unsigned long long)i };
 }
 
 ConstantExpr * ConstantExpr::from_ulong( const CodeLocation & loc, unsigned long i ) {
 	return new ConstantExpr{
-		loc, new BasicType{ BasicType::LongUnsignedInt }, std::to_string( i ),
+		loc, new BasicType{ BasicKind::LongUnsignedInt }, std::to_string( i ),
 		(unsigned long long)i };
 }
 
 ConstantExpr * ConstantExpr::from_string( const CodeLocation & loc, const std::string & str ) {
-	const Type * charType = new BasicType( BasicType::Char );
+	const Type * charType = new BasicType( BasicKind::Char );
 	// Adjust the length of the string for the terminator.
 	const Expr * strSize = from_ulong( loc, str.size() + 1 );
@@ -277,21 +277,21 @@
 
 SizeofExpr::SizeofExpr( const CodeLocation & loc, const Expr * e )
-: Expr( loc, new BasicType{ BasicType::LongUnsignedInt } ), expr( e ), type( nullptr ) {}
+: Expr( loc, new BasicType{ BasicKind::LongUnsignedInt } ), expr( e ), type( nullptr ) {}
 
 SizeofExpr::SizeofExpr( const CodeLocation & loc, const Type * t )
-: Expr( loc, new BasicType{ BasicType::LongUnsignedInt } ), expr( nullptr ), type( t ) {}
+: Expr( loc, new BasicType{ BasicKind::LongUnsignedInt } ), expr( nullptr ), type( t ) {}
 
 // --- AlignofExpr
 
 AlignofExpr::AlignofExpr( const CodeLocation & loc, const Expr * e )
-: Expr( loc, new BasicType{ BasicType::LongUnsignedInt } ), expr( e ), type( nullptr ) {}
+: Expr( loc, new BasicType{ BasicKind::LongUnsignedInt } ), expr( e ), type( nullptr ) {}
 
 AlignofExpr::AlignofExpr( const CodeLocation & loc, const Type * t )
-: Expr( loc, new BasicType{ BasicType::LongUnsignedInt } ), expr( nullptr ), type( t ) {}
+: Expr( loc, new BasicType{ BasicKind::LongUnsignedInt } ), expr( nullptr ), type( t ) {}
 
 // --- OffsetofExpr
 
 OffsetofExpr::OffsetofExpr( const CodeLocation & loc, const Type * ty, const DeclWithType * mem )
-: Expr( loc, new BasicType{ BasicType::LongUnsignedInt } ), type( ty ), member( mem ) {
+: Expr( loc, new BasicType{ BasicKind::LongUnsignedInt } ), type( ty ), member( mem ) {
 	assert( type );
 	assert( member );
@@ -302,5 +302,5 @@
 OffsetPackExpr::OffsetPackExpr( const CodeLocation & loc, const StructInstType * ty )
 : Expr( loc, new ArrayType{
-	new BasicType{ BasicType::LongUnsignedInt }, nullptr, FixedLen, DynamicDim }
+	new BasicType{ BasicKind::LongUnsignedInt }, nullptr, FixedLen, DynamicDim }
 ), type( ty ) {
 	assert( type );
@@ -311,5 +311,5 @@
 LogicalExpr::LogicalExpr(
 	const CodeLocation & loc, const Expr * a1, const Expr * a2, LogicalFlag ia )
-: Expr( loc, new BasicType{ BasicType::SignedInt } ), arg1( a1 ), arg2( a2 ), isAnd( ia ) {}
+: Expr( loc, new BasicType{ BasicKind::SignedInt } ), arg1( a1 ), arg2( a2 ), isAnd( ia ) {}
 
 // --- CommaExpr
Index: src/AST/Pass.impl.hpp
===================================================================
--- src/AST/Pass.impl.hpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/AST/Pass.impl.hpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -477,5 +477,5 @@
 				CodeLocation{}, "__func__",
 				new ast::ArrayType{
-					new ast::BasicType{ ast::BasicType::Char, ast::CV::Const },
+					new ast::BasicType{ ast::BasicKind::Char, ast::CV::Const },
 					nullptr, VariableLen, DynamicDim
 				},
Index: src/AST/Type.hpp
===================================================================
--- src/AST/Type.hpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/AST/Type.hpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -22,4 +22,5 @@
 #include <vector>
 
+#include "BasicKind.hpp"     // for BasicKind
 #include "CVQualifiers.hpp"
 #include "Decl.hpp"          // for AggregateDecl subclasses
@@ -114,58 +115,14 @@
 class BasicType final : public Type {
 public:
-	// GENERATED START, DO NOT EDIT
-	// GENERATED BY BasicTypes-gen.cc
-	enum Kind {
-		Bool,
-		Char,
-		SignedChar,
-		UnsignedChar,
-		ShortSignedInt,
-		ShortUnsignedInt,
-		SignedInt,
-		UnsignedInt,
-		LongSignedInt,
-		LongUnsignedInt,
-		LongLongSignedInt,
-		LongLongUnsignedInt,
-		SignedInt128,
-		UnsignedInt128,
-		uFloat16,
-		uFloat16Complex,
-		uFloat32,
-		uFloat32Complex,
-		Float,
-		FloatComplex,
-		uFloat32x,
-		uFloat32xComplex,
-		uFloat64,
-		uFloat64Complex,
-		Double,
-		DoubleComplex,
-		uFloat64x,
-		uFloat64xComplex,
-		uuFloat80,
-		uFloat128,
-		uFloat128Complex,
-		uuFloat128,
-		LongDouble,
-		LongDoubleComplex,
-		uFloat128x,
-		uFloat128xComplex,
-		NUMBER_OF_BASIC_TYPES
-	} kind;
-	// GENERATED END
-
-	/// xxx -- MAX_INTEGER_TYPE should probably be in BasicTypes-gen.cc, rather than hardcoded here
-	enum { MAX_INTEGER_TYPE = UnsignedInt128 };
+	BasicKind kind;
 
 	/// string names of basic types; generated to match with Kind
 	static const char *typeNames[];
 
-	BasicType( Kind k, CV::Qualifiers q = {}, std::vector<ptr<Attribute>> && as = {} )
+	BasicType( BasicKind k, CV::Qualifiers q = {}, std::vector<ptr<Attribute>> && as = {} )
 	: Type(q, std::move(as)), kind(k) {}
 
 	/// Check if this type represents an integer type
-	bool isInteger() const { return (unsigned)kind <= (unsigned)MAX_INTEGER_TYPE; }
+	bool isInteger() const { return kind <= MAX_INTEGER_TYPE; }
 
 	const Type * accept( Visitor & v ) const override { return v.visit( this ); }
@@ -430,5 +387,5 @@
 	TypeInstType( const TypeInstType & o ) = default;
 
-	TypeInstType( const TypeEnvKey & key );
+	explicit TypeInstType( const TypeEnvKey & key );
 
 	/// sets `base`, updating `kind` correctly
Index: src/AST/module.mk
===================================================================
--- src/AST/module.mk	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/AST/module.mk	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -18,4 +18,5 @@
 	AST/Attribute.cpp \
 	AST/Attribute.hpp \
+	AST/BasicKind.hpp \
 	AST/Bitfield.hpp \
 	AST/Chain.hpp \
Index: src/BasicTypes-gen.cc
===================================================================
--- src/BasicTypes-gen.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/BasicTypes-gen.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -249,4 +249,5 @@
 		} // for
 	} // for
+	int lastInteger = NUMBER_OF_BASIC_TYPES;
 
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // perform breath-first traversal to generate cost graph
@@ -259,4 +260,13 @@
 		} // for
 	} // for
+
+	// Find the last integer type.
+	// Assumes at least 1, and all come before the floating types.
+	for ( int i = 1 ; i < NUMBER_OF_BASIC_TYPES ; i += 1 ) {
+		if ( Floating == graph[i].sign ) {
+			lastInteger = (i - 1);
+			break;
+		}
+	}
 
 	#define STARTMK "// GENERATED START, DO NOT EDIT"
@@ -272,5 +282,5 @@
 	size_t start, end;
 
-	#define TypeH_AST TOP_SRCDIR "src/AST/Type.hpp"
+	#define TypeH_AST TOP_SRCDIR "src/AST/BasicKind.hpp"
 	resetInput( file, TypeH_AST, buffer, code, str );
 
@@ -279,12 +289,12 @@
 	code << str.substr( 0, start );
 
-	code << "\t" << BYMK << endl;
-	code << "\tenum Kind {" << endl;
+	code << BYMK << endl;
+	code << "enum BasicKind {" << endl;
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
-		code << "\t\t" << graph[r].name << "," << endl;
-	} // for
-	code << "\t\tNUMBER_OF_BASIC_TYPES" << endl;
-	code << "\t} kind;" << endl;
-	code << "\t";										// indentation for end marker
+		code << "\t" << graph[r].name << "," << endl;
+	} // for
+	code << "\tNUMBER_OF_BASIC_TYPES," << endl;
+	code << "\tMAX_INTEGER_TYPE = " << graph[lastInteger].name << "," << endl;
+	code << "};" << endl;
 
 	if ( (start = str.find( ENDMK, start + 1 )) == string::npos ) Abort( "end", TypeH_AST );
@@ -347,5 +357,5 @@
 
 	code << "\t" << BYMK << endl;
-	code << "\tstatic const int costMatrix[ast::BasicType::NUMBER_OF_BASIC_TYPES][ast::BasicType::NUMBER_OF_BASIC_TYPES] = { // path length from root to node" << endl
+	code << "\tstatic const int costMatrix[ast::BasicKind::NUMBER_OF_BASIC_TYPES][ast::BasicKind::NUMBER_OF_BASIC_TYPES] = { // path length from root to node" << endl
 		 << "\t\t/*           ";
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // titles
@@ -372,5 +382,5 @@
 
 	code << "\t" << BYMK << endl;
-	code << "\tstatic const int signMatrix[ast::BasicType::NUMBER_OF_BASIC_TYPES][ast::BasicType::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion" << endl
+	code << "\tstatic const int signMatrix[ast::BasicKind::NUMBER_OF_BASIC_TYPES][ast::BasicKind::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion" << endl
 		 << "\t\t/*           ";
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // titles
@@ -404,5 +414,5 @@
 	enum { PER_ROW = 6 };
 	code << "\t" << BYMK << endl;
-	code << "\t#define BT ast::BasicType::" << endl;
+	code << "\t#define BT ast::BasicKind::" << endl;
 	code << "\tstatic const BT Kind commonTypes[BT NUMBER_OF_BASIC_TYPES][BT NUMBER_OF_BASIC_TYPES] = { // nearest common ancestor" << endl
 	     << "\t\t/*\t\t ";
@@ -460,5 +470,5 @@
 		"//   - \"Ds\" char16_t\n";
 
-	code << "const std::string basicTypes[ast::BasicType::NUMBER_OF_BASIC_TYPES] = {" << endl;
+	code << "const std::string basicTypes[ast::BasicKind::NUMBER_OF_BASIC_TYPES] = {" << endl;
 	for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) {
 		code << "\t\"" << graph[r].mangled << "\"," << setw(9 - strlen(graph[r].mangled)) << ' ' << "// " << graph[r].type << endl;
Index: src/CodeGen/FixMain.cc
===================================================================
--- src/CodeGen/FixMain.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/CodeGen/FixMain.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -52,5 +52,5 @@
 ast::ObjectDecl * makeIntObj(){
 	return new ast::ObjectDecl( CodeLocation(), "",
-		new ast::BasicType( ast::BasicType::SignedInt ) );
+		new ast::BasicType( ast::BasicKind::SignedInt ) );
 }
 
@@ -59,5 +59,5 @@
 		new ast::PointerType(
 			new ast::PointerType(
-				new ast::BasicType( ast::BasicType::Char ) ) ) );
+				new ast::BasicType( ast::BasicKind::Char ) ) ) );
 }
 
Index: src/CodeGen/GenType.cc
===================================================================
--- src/CodeGen/GenType.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/CodeGen/GenType.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -87,6 +87,6 @@
 
 void GenType::postvisit( ast::BasicType const * type ) {
-	ast::BasicType::Kind kind = type->kind;
-	assert( 0 <= kind && kind < ast::BasicType::NUMBER_OF_BASIC_TYPES );
+	ast::BasicKind kind = type->kind;
+	assert( 0 <= kind && kind < ast::BasicKind::NUMBER_OF_BASIC_TYPES );
 	result = std::string( ast::BasicType::typeNames[kind] ) + " " + result;
 	handleQualifiers( type );
Index: src/Common/ResolvProtoDump.cpp
===================================================================
--- src/Common/ResolvProtoDump.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Common/ResolvProtoDump.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -229,5 +229,5 @@
 	void previsit( const ast::EnumInstType * ) {
 		// TODO: Add the meaningful text representation of typed enum
-		ss << (int)ast::BasicType::SignedInt;
+		ss << (int)ast::BasicKind::SignedInt;
 	}
 
@@ -255,9 +255,9 @@
 	// TODO: Support 0 and 1 with their type names and conversions.
 	void previsit( const ast::ZeroType * ) {
-		ss << (int)ast::BasicType::SignedInt;
+		ss << (int)ast::BasicKind::SignedInt;
 	}
 
 	void previsit( const ast::OneType * ) {
-		ss << (int)ast::BasicType::SignedInt;
+		ss << (int)ast::BasicKind::SignedInt;
 	}
 
@@ -366,13 +366,13 @@
 	// TODO: Extra expression to resolve argument.
 	void previsit( const ast::SizeofExpr * ) {
-		ss << (int)ast::BasicType::LongUnsignedInt;
+		ss << (int)ast::BasicKind::LongUnsignedInt;
 		visit_children = false;
 	}
 	void previsit( const ast::AlignofExpr * ) {
-		ss << (int)ast::BasicType::LongUnsignedInt;
+		ss << (int)ast::BasicKind::LongUnsignedInt;
 		visit_children = false;
 	}
 	void previsit( const ast::UntypedOffsetofExpr * ) {
-		ss << (int)ast::BasicType::LongUnsignedInt;
+		ss << (int)ast::BasicKind::LongUnsignedInt;
 		visit_children = false;
 	}
@@ -753,5 +753,5 @@
 		// &? Address of operator.
 		out << "#$ptr<T> $addr T" << std::endl;
-		const int intId = (int)ast::BasicType::SignedInt;
+		const int intId = (int)ast::BasicKind::SignedInt;
 		// ?&&? ?||? ?: Logical operators.
 		out << intId << " $and " << intId << ' ' << intId << std::endl;
Index: src/Concurrency/Corun.cpp
===================================================================
--- src/Concurrency/Corun.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Concurrency/Corun.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -130,5 +130,5 @@
                 new ObjectDecl( loc,
                     numProcsName,
-                    new BasicType( BasicType::Kind::UnsignedInt ),
+                    new BasicType( BasicKind::UnsignedInt ),
                     new SingleInit( loc, 
                         new UntypedExpr( loc,
@@ -146,5 +146,5 @@
                 new ObjectDecl( loc,
                     currProcsName,
-                    new BasicType( BasicType::Kind::UnsignedInt ),
+                    new BasicType( BasicKind::UnsignedInt ),
                     new SingleInit( loc, ConstantExpr::from_int( loc, 0 ) )
                 )
Index: src/Concurrency/Waitfor.cpp
===================================================================
--- src/Concurrency/Waitfor.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Concurrency/Waitfor.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -244,5 +244,5 @@
 	ast::ObjectDecl * flag = new ast::ObjectDecl( location,
 		namer_flg.newName(),
-		new ast::BasicType( ast::BasicType::Bool ),
+		new ast::BasicType( ast::BasicKind::Bool ),
 		new ast::SingleInit( location,
 			ast::ConstantExpr::from_ulong( location, 0 )
@@ -349,5 +349,5 @@
 	ast::ObjectDecl * timeout = new ast::ObjectDecl( topLocation,
 		namer_tim.newName(),
-		new ast::BasicType( ast::BasicType::LongLongUnsignedInt ),
+		new ast::BasicType( ast::BasicKind::LongLongUnsignedInt ),
 		new ast::SingleInit( topLocation,
 			ast::ConstantExpr::from_int( topLocation, -1 )
@@ -397,5 +397,5 @@
 	ast::ObjectDecl * index = new ast::ObjectDecl( location,
 		namer_idx.newName(),
-		new ast::BasicType( ast::BasicType::ShortSignedInt ),
+		new ast::BasicType( ast::BasicKind::ShortSignedInt ),
 		new ast::SingleInit( location,
 			ast::ConstantExpr::from_int( location, -1 )
Index: src/Concurrency/Waituntil.cpp
===================================================================
--- src/Concurrency/Waituntil.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Concurrency/Waituntil.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -498,6 +498,6 @@
             rightExpr = genPredExpr( loc, currNode->right, idx, genLeaf );
             return new LogicalExpr( loc, 
-                new CastExpr( loc, leftExpr, new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ),
-                new CastExpr( loc, rightExpr, new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ), 
+                new CastExpr( loc, leftExpr, new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast ),
+                new CastExpr( loc, rightExpr, new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast ), 
                 LogicalFlag::AndExpr 
             );
@@ -507,6 +507,6 @@
             rightExpr = genPredExpr( loc, currNode->right, idx, genLeaf );
             return new LogicalExpr( loc,
-                new CastExpr( loc, leftExpr, new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ),
-                new CastExpr( loc, rightExpr, new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ), 
+                new CastExpr( loc, leftExpr, new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast ),
+                new CastExpr( loc, rightExpr, new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast ), 
                 LogicalFlag::OrExpr );
             break;
@@ -556,5 +556,5 @@
             new ObjectDecl( loc,
                 "clause_statuses",
-                new PointerType( new BasicType( BasicType::Kind::LongUnsignedInt ) )
+                new PointerType( new BasicType( BasicKind::LongUnsignedInt ) )
             )
         },
@@ -562,5 +562,5 @@
             new ObjectDecl( loc,
                 "sat_ret",
-                new BasicType( BasicType::Kind::Bool )
+                new BasicType( BasicKind::Bool )
             )
         },
@@ -766,5 +766,5 @@
                 new ObjectDecl( loc,
                     idxName,
-                    new BasicType( BasicType::Kind::SignedInt ),
+                    new BasicType( BasicKind::SignedInt ),
                     new SingleInit( loc, ConstantExpr::from_int( loc, 0 ) )
                 )
@@ -893,5 +893,5 @@
                     new ObjectDecl( cLoc,
                         currClause->whenName,
-                        new BasicType( BasicType::Kind::Bool ),
+                        new BasicType( BasicKind::Bool ),
                         new SingleInit( cLoc, ast::deepCopy( stmt->clauses.at(i)->when_cond ) )
                     )
@@ -915,5 +915,5 @@
                 new ObjectDecl( stmt->else_cond->location,
                     elseWhenName,
-                    new BasicType( BasicType::Kind::Bool ),
+                    new BasicType( BasicKind::Bool ),
                     new SingleInit( stmt->else_cond->location, ast::deepCopy( stmt->else_cond ) )
                 )
@@ -945,5 +945,5 @@
                     new CastExpr( cLoc, 
                         new AddressExpr( cLoc, new NameExpr( cLoc, data.at(i)->nodeName ) ),
-                        new BasicType( BasicType::Kind::LongUnsignedInt ), GeneratedFlag::ExplicitCast 
+                        new BasicType( BasicKind::LongUnsignedInt ), GeneratedFlag::ExplicitCast 
                     )
                 }
@@ -986,9 +986,9 @@
                     new CastExpr( cLoc,
                         new NameExpr( cLoc, elseWhenName ),
-                        new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
+                        new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast 
                     ),
                     new CastExpr( cLoc,
                         raceFnCall,
-                        new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
+                        new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast 
                     ),
                     LogicalFlag::AndExpr
@@ -1016,9 +1016,9 @@
             new CastExpr( cLoc,
                 new NameExpr( cLoc, data.at(idx)->whenName ), 
-                new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
+                new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast 
             ),
             new CastExpr( cLoc,
                 baseCond,
-                new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
+                new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast 
             ),
             LogicalFlag::AndExpr
@@ -1034,5 +1034,5 @@
                         new NameExpr( cLoc, data.at(idx)->nodeName ),
                         new AddressExpr( cLoc, new NameExpr( cLoc, data.at(idx)->statusName ) ),
-                        ConstantExpr::null( cLoc, new PointerType( new BasicType( BasicType::Kind::SignedInt ) ) )
+                        ConstantExpr::null( cLoc, new PointerType( new BasicType( BasicKind::SignedInt ) ) )
                     }
                 )
@@ -1096,5 +1096,5 @@
         new ObjectDecl( loc,
             statusName,
-            new BasicType( BasicType::Kind::LongUnsignedInt ),
+            new BasicType( BasicKind::LongUnsignedInt ),
             new SingleInit( loc, ConstantExpr::from_int( loc, 0 ) )
         )
@@ -1114,5 +1114,5 @@
             new NameExpr( cLoc, "?!=?" ), 
             {
-                ConstantExpr::null( cLoc, new PointerType( new BasicType( BasicType::Kind::LongUnsignedInt ) ) ),
+                ConstantExpr::null( cLoc, new PointerType( new BasicType( BasicKind::LongUnsignedInt ) ) ),
                 new UntypedExpr( cLoc, 
                     new NameExpr( cLoc, "__get_clause_status" ), 
@@ -1128,9 +1128,9 @@
                 new CastExpr( cLoc,
                     new NameExpr( cLoc, clauseData.at(i)->whenName ), 
-                    new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
+                    new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast 
                 ),
                 new CastExpr( cLoc,
                     statusPtrCheck,
-                    new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
+                    new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast 
                 ),
                 LogicalFlag::AndExpr
@@ -1162,9 +1162,9 @@
                 new CastExpr( loc,
                     new NameExpr( loc, clauseData.at( whenIndices.at(i) )->whenName ), 
-                    new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
+                    new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast 
                 ),
                 new CastExpr( loc,
                     lastExpr,
-                    new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
+                    new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast 
                 ),
                 LogicalFlag::OrExpr
@@ -1220,5 +1220,5 @@
         new ObjectDecl( loc,
             pCountName,
-            new BasicType( BasicType::Kind::SignedInt ),
+            new BasicType( BasicKind::SignedInt ),
             new SingleInit( loc, ConstantExpr::from_int( loc, 0 ) )
         )
@@ -1229,5 +1229,5 @@
         new ObjectDecl( loc,
             statusArrName,
-            new ArrayType( new BasicType( BasicType::Kind::LongUnsignedInt ), ConstantExpr::from_int( loc, numClauses ), LengthFlag::FixedLen, DimensionFlag::DynamicDim ),
+            new ArrayType( new BasicType( BasicKind::LongUnsignedInt ), ConstantExpr::from_int( loc, numClauses ), LengthFlag::FixedLen, DimensionFlag::DynamicDim ),
             new ListInit( loc,
                 {
@@ -1331,9 +1331,9 @@
             new CastExpr( cLoc,
                 statusExpr, 
-                new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
+                new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast 
             ),
             new CastExpr( cLoc,
                 genSelectTraitCall( stmt->clauses.at(i), clauseData.at(i), "unregister_select" ),
-                new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
+                new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast 
             ),
             LogicalFlag::AndExpr
@@ -1346,9 +1346,9 @@
                 new CastExpr( cLoc,
                     new NameExpr( cLoc, clauseData.at(i)->whenName ), 
-                    new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
+                    new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast 
                 ),
                 new CastExpr( cLoc,
                     statusExpr,
-                    new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast 
+                    new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast 
                 ),
                 LogicalFlag::AndExpr
Index: src/ControlStruct/ExceptDecl.cpp
===================================================================
--- src/ControlStruct/ExceptDecl.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/ControlStruct/ExceptDecl.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -99,5 +99,5 @@
 		createExceptionInstType( exceptionName, params ) ) );
 	type->returns.push_back( new ast::PointerType(
-		new ast::BasicType( ast::BasicType::Char, ast::CV::Const ) ) );
+		new ast::BasicType( ast::BasicKind::Char, ast::CV::Const ) ) );
 	return type;
 }
@@ -344,5 +344,5 @@
 				"",
 				new ast::PointerType(
-					new ast::BasicType( ast::BasicType::Char, ast::CV::Const ) )
+					new ast::BasicType( ast::BasicKind::Char, ast::CV::Const ) )
 			),
 		},
Index: src/ControlStruct/ExceptTranslate.cpp
===================================================================
--- src/ControlStruct/ExceptTranslate.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/ControlStruct/ExceptTranslate.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -182,5 +182,5 @@
 		location,
 		"__handler_index",
-		new ast::BasicType( ast::BasicType::SignedInt )
+		new ast::BasicType( ast::BasicKind::SignedInt )
 		);
 }
@@ -201,5 +201,5 @@
 		location,
 		"__ret_bool",
-		new ast::BasicType( ast::BasicType::Bool ),
+		new ast::BasicType( ast::BasicKind::Bool ),
 		nullptr, //init
 		ast::Storage::Classes{},
@@ -231,5 +231,5 @@
 		location,
 		"__handler_index",
-		new ast::BasicType(ast::BasicType::SignedInt),
+		new ast::BasicType( ast::BasicKind::SignedInt ),
 		nullptr,
 		ast::Storage::Classes{},
Index: src/GenPoly/Box.cpp
===================================================================
--- src/GenPoly/Box.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/GenPoly/Box.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -43,10 +43,10 @@
 /// The layout type is used to represent sizes, alignments and offsets.
 ast::BasicType * makeLayoutType() {
-	return new ast::BasicType( ast::BasicType::LongUnsignedInt );
+	return new ast::BasicType( ast::BasicKind::LongUnsignedInt );
 }
 
 /// Fixed version of layout type (just adding a 'C' in C++ style).
 ast::BasicType * makeLayoutCType() {
-	return new ast::BasicType( ast::BasicType::LongUnsignedInt,
+	return new ast::BasicType( ast::BasicKind::LongUnsignedInt,
 		ast::CV::Qualifiers( ast::CV::Const ) );
 }
@@ -1617,5 +1617,5 @@
 ast::Type * polyToMonoType( CodeLocation const & location,
 		ast::Type const * declType ) {
-	auto charType = new ast::BasicType( ast::BasicType::Char );
+	auto charType = new ast::BasicType( ast::BasicKind::Char );
 	auto size = new ast::NameExpr( location,
 		sizeofName( Mangle::mangleType( declType ) ) );
Index: src/InitTweak/FixInit.cpp
===================================================================
--- src/InitTweak/FixInit.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/InitTweak/FixInit.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -847,5 +847,5 @@
 
 			// static bool __objName_uninitialized = true
-			auto boolType = new ast::BasicType( ast::BasicType::Kind::Bool );
+			auto boolType = new ast::BasicType( ast::BasicKind::Bool );
 			auto boolInitExpr = new ast::SingleInit(loc, ast::ConstantExpr::from_int(loc, 1 ) );
 			auto isUninitializedVar = new ast::ObjectDecl(loc, objDecl->mangleName + "_uninitialized", boolType, boolInitExpr, ast::Storage::Static, ast::Linkage::Cforall);
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Makefile.am	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -53,7 +53,7 @@
 include Virtual/module.mk
 
-$(addprefix $(srcdir)/, ResolvExpr/ConversionCost.cc ResolvExpr/CommonType.cc SymTab/ManglerCommon.cc) : $(srcdir)/AST/Type.hpp
+$(addprefix $(srcdir)/, ResolvExpr/ConversionCost.cc ResolvExpr/CommonType.cc SymTab/ManglerCommon.cc) : $(srcdir)/AST/BasicKind.hpp
 
-$(srcdir)/AST/Type.hpp : BasicTypes-gen.cc
+$(srcdir)/AST/BasicKind.hpp : BasicTypes-gen.cc
 	${AM_V_GEN}${CXXCOMPILE} $< -o BasicTypes-gen -Wall -Wextra -Werror=return-type
 	@./BasicTypes-gen
Index: src/Parser/ExpressionNode.cc
===================================================================
--- src/Parser/ExpressionNode.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Parser/ExpressionNode.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -23,6 +23,7 @@
 #include <string>                  // for string, operator+, operator==
 
+#include "AST/BasicKind.hpp"       // for BasicKind
 #include "AST/Expr.hpp"            // for NameExpr
-#include "AST/Type.hpp"            // for BaseType, SueInstType
+#include "AST/Type.hpp"            // for Type, LengthFlag, DimentionFlag
 #include "Common/SemanticError.h"  // for SemanticError
 #include "Common/utility.h"        // for maybeMoveBuild, maybeBuild, CodeLo...
@@ -126,8 +127,8 @@
 ast::Expr * build_constantInteger(
 		const CodeLocation & location, string & str ) {
-	static const ast::BasicType::Kind kind[2][6] = {
+	static const ast::BasicKind kind[2][6] = {
 		// short (h) must be before char (hh) because shorter type has the longer suffix
-		{ ast::BasicType::ShortSignedInt, ast::BasicType::SignedChar, ast::BasicType::SignedInt, ast::BasicType::LongSignedInt, ast::BasicType::LongLongSignedInt, /* BasicType::SignedInt128 */ ast::BasicType::LongLongSignedInt, },
-		{ ast::BasicType::ShortUnsignedInt, ast::BasicType::UnsignedChar, ast::BasicType::UnsignedInt, ast::BasicType::LongUnsignedInt, ast::BasicType::LongLongUnsignedInt, /* BasicType::UnsignedInt128 */ ast::BasicType::LongLongUnsignedInt, },
+		{ ast::BasicKind::ShortSignedInt, ast::BasicKind::SignedChar, ast::BasicKind::SignedInt, ast::BasicKind::LongSignedInt, ast::BasicKind::LongLongSignedInt, /* BasicKind::SignedInt128 */ ast::BasicKind::LongLongSignedInt, },
+		{ ast::BasicKind::ShortUnsignedInt, ast::BasicKind::UnsignedChar, ast::BasicKind::UnsignedInt, ast::BasicKind::LongUnsignedInt, ast::BasicKind::LongLongUnsignedInt, /* BasicKind::UnsignedInt128 */ ast::BasicKind::LongLongUnsignedInt, },
 	};
 
@@ -313,5 +314,5 @@
 		if ( ltype == 6 ) {								// int128, (int128)constant
 			ret2 = new ast::ConstantExpr( location,
-				new ast::BasicType( ast::BasicType::LongLongSignedInt ),
+				new ast::BasicType( ast::BasicKind::LongLongSignedInt ),
 				str2,
 				v2 );
@@ -379,7 +380,7 @@
 ast::Expr * build_constantFloat(
 		const CodeLocation & location, string & str ) {
-	static const ast::BasicType::Kind kind[2][12] = {
-		{ ast::BasicType::Float, ast::BasicType::Double, ast::BasicType::LongDouble, ast::BasicType::uuFloat80, ast::BasicType::uuFloat128, ast::BasicType::uFloat16, ast::BasicType::uFloat32, ast::BasicType::uFloat32x, ast::BasicType::uFloat64, ast::BasicType::uFloat64x, ast::BasicType::uFloat128, ast::BasicType::uFloat128x },
-		{ ast::BasicType::FloatComplex, ast::BasicType::DoubleComplex, ast::BasicType::LongDoubleComplex, ast::BasicType::NUMBER_OF_BASIC_TYPES, ast::BasicType::NUMBER_OF_BASIC_TYPES, ast::BasicType::uFloat16Complex, ast::BasicType::uFloat32Complex, ast::BasicType::uFloat32xComplex, ast::BasicType::uFloat64Complex, ast::BasicType::uFloat64xComplex, ast::BasicType::uFloat128Complex, ast::BasicType::uFloat128xComplex },
+	static const ast::BasicKind kind[2][12] = {
+		{ ast::BasicKind::Float, ast::BasicKind::Double, ast::BasicKind::LongDouble, ast::BasicKind::uuFloat80, ast::BasicKind::uuFloat128, ast::BasicKind::uFloat16, ast::BasicKind::uFloat32, ast::BasicKind::uFloat32x, ast::BasicKind::uFloat64, ast::BasicKind::uFloat64x, ast::BasicKind::uFloat128, ast::BasicKind::uFloat128x },
+		{ ast::BasicKind::FloatComplex, ast::BasicKind::DoubleComplex, ast::BasicKind::LongDoubleComplex, ast::BasicKind::NUMBER_OF_BASIC_TYPES, ast::BasicKind::NUMBER_OF_BASIC_TYPES, ast::BasicKind::uFloat16Complex, ast::BasicKind::uFloat32Complex, ast::BasicKind::uFloat32xComplex, ast::BasicKind::uFloat64Complex, ast::BasicKind::uFloat64xComplex, ast::BasicKind::uFloat128Complex, ast::BasicKind::uFloat128xComplex },
 	};
 
@@ -447,5 +448,5 @@
 
 	ast::Expr * ret = new ast::ConstantExpr( location,
-		new ast::BasicType( ast::BasicType::Char ),
+		new ast::BasicType( ast::BasicKind::Char ),
 		str,
 		(unsigned long long int)(unsigned char)str[1] );
@@ -482,5 +483,5 @@
 	Default:											// char default string type
 	default:
-		strtype = new ast::BasicType( ast::BasicType::Char );
+		strtype = new ast::BasicType( ast::BasicKind::Char );
 	} // switch
 	ast::ArrayType * at = new ast::ArrayType(
@@ -664,5 +665,5 @@
 		member->name
 	);
-	ret->result = new ast::BasicType( ast::BasicType::LongUnsignedInt );
+	ret->result = new ast::BasicType( ast::BasicKind::LongUnsignedInt );
 	delete member;
 	return ret;
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Parser/TypeData.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -19,8 +19,9 @@
 #include <ostream>                 // for operator<<, ostream, basic_ostream
 
+#include "AST/Attribute.hpp"       // for Attribute
 #include "AST/Decl.hpp"            // for AggregateDecl, ObjectDecl, TypeDe...
-#include "AST/Attribute.hpp"       // for Attribute
 #include "AST/Init.hpp"            // for SingleInit, ListInit
 #include "AST/Print.hpp"           // for print
+#include "AST/Type.hpp"            // for Type
 #include "Common/SemanticError.h"  // for SemanticError
 #include "Common/utility.h"        // for splice, spliceBegin
@@ -1010,5 +1011,5 @@
 		// fill in implicit int
 		return new ast::BasicType(
-			ast::BasicType::SignedInt,
+			ast::BasicKind::SignedInt,
 			buildQualifiers( td )
 		);
@@ -1095,5 +1096,5 @@
 
 ast::Type * buildBasicType( const TypeData * td ) {
-	ast::BasicType::Kind ret;
+	ast::BasicKind ret;
 
 	switch ( td->basictype ) {
@@ -1116,5 +1117,5 @@
 		} // if
 
-		ret = ast::BasicType::Bool;
+		ret = ast::BasicKind::Bool;
 		break;
 
@@ -1123,5 +1124,5 @@
 		// character types. The implementation shall define char to have the same range, representation, and behavior as
 		// either signed char or unsigned char.
-		static ast::BasicType::Kind chartype[] = { ast::BasicType::SignedChar, ast::BasicType::UnsignedChar, ast::BasicType::Char };
+		static ast::BasicKind chartype[] = { ast::BasicKind::SignedChar, ast::BasicKind::UnsignedChar, ast::BasicKind::Char };
 
 		if ( td->length != TypeData::NoLength ) {
@@ -1133,7 +1134,7 @@
 
 	case TypeData::Int:
-		static ast::BasicType::Kind inttype[2][4] = {
-			{ ast::BasicType::ShortSignedInt, ast::BasicType::LongSignedInt, ast::BasicType::LongLongSignedInt, ast::BasicType::SignedInt },
-			{ ast::BasicType::ShortUnsignedInt, ast::BasicType::LongUnsignedInt, ast::BasicType::LongLongUnsignedInt, ast::BasicType::UnsignedInt },
+		static ast::BasicKind inttype[2][4] = {
+			{ ast::BasicKind::ShortSignedInt, ast::BasicKind::LongSignedInt, ast::BasicKind::LongLongSignedInt, ast::BasicKind::SignedInt },
+			{ ast::BasicKind::ShortUnsignedInt, ast::BasicKind::LongUnsignedInt, ast::BasicKind::LongLongUnsignedInt, ast::BasicKind::UnsignedInt },
 		};
 
@@ -1146,5 +1147,5 @@
 
 	case TypeData::Int128:
-		ret = td->signedness == TypeData::Unsigned ? ast::BasicType::UnsignedInt128 : ast::BasicType::SignedInt128;
+		ret = td->signedness == TypeData::Unsigned ? ast::BasicKind::UnsignedInt128 : ast::BasicKind::SignedInt128;
 		if ( td->length != TypeData::NoLength ) {
 			genTSError( TypeData::lengthNames[ td->length ], td->basictype );
@@ -1164,7 +1165,7 @@
 	case TypeData::uFloat128:
 	case TypeData::uFloat128x:
-		static ast::BasicType::Kind floattype[2][12] = {
-			{ ast::BasicType::FloatComplex, ast::BasicType::DoubleComplex, ast::BasicType::LongDoubleComplex, (ast::BasicType::Kind)-1, (ast::BasicType::Kind)-1, ast::BasicType::uFloat16Complex, ast::BasicType::uFloat32Complex, ast::BasicType::uFloat32xComplex, ast::BasicType::uFloat64Complex, ast::BasicType::uFloat64xComplex, ast::BasicType::uFloat128Complex, ast::BasicType::uFloat128xComplex, },
-			{ ast::BasicType::Float, ast::BasicType::Double, ast::BasicType::LongDouble, ast::BasicType::uuFloat80, ast::BasicType::uuFloat128, ast::BasicType::uFloat16, ast::BasicType::uFloat32, ast::BasicType::uFloat32x, ast::BasicType::uFloat64, ast::BasicType::uFloat64x, ast::BasicType::uFloat128, ast::BasicType::uFloat128x, },
+		static ast::BasicKind floattype[2][12] = {
+			{ ast::BasicKind::FloatComplex, ast::BasicKind::DoubleComplex, ast::BasicKind::LongDoubleComplex, (ast::BasicKind)-1, (ast::BasicKind)-1, ast::BasicKind::uFloat16Complex, ast::BasicKind::uFloat32Complex, ast::BasicKind::uFloat32xComplex, ast::BasicKind::uFloat64Complex, ast::BasicKind::uFloat64xComplex, ast::BasicKind::uFloat128Complex, ast::BasicKind::uFloat128xComplex, },
+			{ ast::BasicKind::Float, ast::BasicKind::Double, ast::BasicKind::LongDouble, ast::BasicKind::uuFloat80, ast::BasicKind::uuFloat128, ast::BasicKind::uFloat16, ast::BasicKind::uFloat32, ast::BasicKind::uFloat32x, ast::BasicKind::uFloat64, ast::BasicKind::uFloat64x, ast::BasicKind::uFloat128, ast::BasicKind::uFloat128x, },
 		};
 
@@ -1213,5 +1214,5 @@
 
 static ast::Type * buildDefaultType( const TypeData * td ) {
-	return ( td ) ? typebuild( td ) : new ast::BasicType( ast::BasicType::SignedInt );
+	return ( td ) ? typebuild( td ) : new ast::BasicType( ast::BasicKind::SignedInt );
 } // buildDefaultType
 
@@ -1579,5 +1580,5 @@
 			td->location,
 			"",
-			new ast::BasicType( ast::BasicType::SignedInt ),
+			new ast::BasicType( ast::BasicKind::SignedInt ),
 			(ast::Init *)nullptr,
 			ast::Storage::Classes(),
@@ -1667,5 +1668,5 @@
 	} else {
 		ft->returns.push_back(
-			new ast::BasicType( ast::BasicType::SignedInt ) );
+			new ast::BasicType( ast::BasicKind::SignedInt ) );
 	} // if
 	return ft;
Index: src/Parser/TypeData.h
===================================================================
--- src/Parser/TypeData.h	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Parser/TypeData.h	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -20,5 +20,6 @@
 #include <string>                                   // for string
 
-#include "AST/Type.hpp"                             // for Type
+#include "AST/CVQualifiers.hpp"                     // for CV
+#include "AST/Fwd.hpp"                              // for Type
 #include "DeclarationNode.h"                        // for DeclarationNode
 
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Parser/parser.yy	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -55,4 +55,5 @@
 #include "TypedefTable.h"
 #include "TypeData.h"
+#include "AST/Type.hpp"                                 // for BasicType, BasicKind
 #include "Common/SemanticError.h"						// error_str
 #include "Common/utility.h"								// for maybeMoveBuild, maybeBuild, CodeLo...
@@ -260,5 +261,5 @@
 	ast::ConstantExpr * constant = dynamic_cast<ast::ConstantExpr *>(type->expr.get());
 	if ( constant && (constant->rep == "0" || constant->rep == "1") ) {
-		type = new ExpressionNode( new ast::CastExpr( location, maybeMoveBuild(type), new ast::BasicType( ast::BasicType::SignedInt ) ) );
+		type = new ExpressionNode( new ast::CastExpr( location, maybeMoveBuild(type), new ast::BasicType( ast::BasicKind::SignedInt ) ) );
 	} // if
 	DeclarationNode * initDecl = distAttr(
Index: src/ResolvExpr/CandidateFinder.cpp
===================================================================
--- src/ResolvExpr/CandidateFinder.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/ResolvExpr/CandidateFinder.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -1382,5 +1382,5 @@
 				}
 			}
-			
+
 			CandidateRef newCand = std::make_shared<Candidate>(
 				newExpr, copy( tenv ), ast::OpenVarSet{}, ast::AssertionSet{}, bentConversion? Cost::safe: Cost::zero,
@@ -1776,5 +1776,4 @@
 						auto commonAsEnumAttr = common.as<ast::EnumAttrType>();
 						if ( commonAsEnumAttr && commonAsEnumAttr->attr == ast::EnumAttribute::Value ) {
-							
 							auto callExpr = new ast::UntypedExpr(
 								cand->expr->location, new ast::NameExpr( cand->expr->location, "valueE"), {cand->expr} );
@@ -1805,8 +1804,8 @@
 							// if this somehow changes in the future (e.g. delayed by indeterminate return type)
 							// we may need to revisit the logic.
-							inferParameters( newCand, matches );	
+							inferParameters( newCand, matches );
 						}
-					}			
-				}	
+					}
+				}
 			}
 		}
@@ -2161,5 +2160,5 @@
 			}
 		),
-		new ast::BasicType( ast::BasicType::SignedInt )
+		new ast::BasicType( ast::BasicKind::SignedInt )
 	);
 }
Index: src/ResolvExpr/CandidateFinder.hpp
===================================================================
--- src/ResolvExpr/CandidateFinder.hpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/ResolvExpr/CandidateFinder.hpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -30,10 +30,10 @@
 struct CandidateFinder {
 	CandidateList candidates;          ///< List of candidate resolutions
-	const ResolveContext & context;  ///< Information about where the canditates are being found.
+	const ResolveContext & context;    ///< Information about where the canditates are being found.
 	const ast::TypeEnvironment & env;  ///< Substitutions performed in this resolution
 	ast::ptr< ast::Type > targetType;  ///< Target type for resolution
 	bool strictMode = false;           ///< If set to true, requires targetType to be exact match (inside return cast)
 	bool allowVoid = false;            ///< If set to true, allow void-returning function calls (only top level, cast to void and first in comma)
-	std::set< std::string > otypeKeys;  /// different type may map to same key
+	std::set< std::string > otypeKeys; ///< different type may map to same key
 
 	CandidateFinder(
@@ -70,6 +70,8 @@
 	const ast::Expr * expr, Cost & cost );
 
-const ast::Expr * getValueEnumCall(const ast::Expr * expr,
-	const ResolvExpr::ResolveContext & context, const ast::TypeEnvironment & env );
+/// Get the valueE application that returns the enum's value.
+const ast::Expr * getValueEnumCall( const ast::Expr * expr,
+	const ResolveContext & context, const ast::TypeEnvironment & env );
+
 /// Wrap an expression to convert the result to a conditional result.
 const ast::Expr * createCondExpr( const ast::Expr * expr );
Index: src/ResolvExpr/CommonType.cc
===================================================================
--- src/ResolvExpr/CommonType.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/ResolvExpr/CommonType.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -38,6 +38,6 @@
 	// GENERATED START, DO NOT EDIT
 	// GENERATED BY BasicTypes-gen.cc
-	#define BT ast::BasicType::
-	static const BT Kind commonTypes[BT NUMBER_OF_BASIC_TYPES][BT NUMBER_OF_BASIC_TYPES] = { // nearest common ancestor
+	#define BT ast::BasicKind::
+	static const ast::BasicKind commonTypes[BT NUMBER_OF_BASIC_TYPES][BT NUMBER_OF_BASIC_TYPES] = { // nearest common ancestor
 		/*		                        B                       C                      SC                      UC                      SI                     SUI
 				                        I                      UI                      LI                     LUI                     LLI                    LLUI
@@ -339,5 +339,5 @@
 	// GENERATED END
 	static_assert(
-		sizeof(commonTypes)/sizeof(commonTypes[0][0]) == ast::BasicType::NUMBER_OF_BASIC_TYPES * ast::BasicType::NUMBER_OF_BASIC_TYPES,
+		sizeof(commonTypes)/sizeof(commonTypes[0][0]) == ast::BasicKind::NUMBER_OF_BASIC_TYPES * ast::BasicKind::NUMBER_OF_BASIC_TYPES,
 		"Each basic type kind should have a corresponding row in the combined type matrix"
 	);
@@ -366,5 +366,5 @@
 	void postvisit( const ast::BasicType * basic ) {
 		if ( auto basic2 = dynamic_cast< const ast::BasicType * >( type2 ) ) {
-			ast::BasicType::Kind kind;
+			ast::BasicKind kind;
 			if (basic->kind != basic2->kind && !widen.first && !widen.second) return;
 			else if (!widen.first) kind = basic->kind; // widen.second
@@ -386,5 +386,5 @@
 			const ast::EnumDecl* enumDecl = enumInst->base;
 			if ( !enumDecl->base ) {
-				ast::BasicType::Kind kind = commonTypes[ basic->kind ][ ast::BasicType::SignedInt ];
+				ast::BasicKind kind = commonTypes[ basic->kind ][ ast::BasicKind::SignedInt ];
 				if (
 					( ( kind == basic->kind && basic->qualifiers >= type2->qualifiers )
@@ -398,5 +398,5 @@
 		} else if ( auto type2AsAttr = dynamic_cast< const ast::EnumAttrType * >( type2 ) ) {
             if ( type2AsAttr->attr == ast::EnumAttribute::Posn ) {
-			    ast::BasicType::Kind kind = commonTypes[ basic->kind ][ ast::BasicType::SignedInt ];
+			    ast::BasicKind kind = commonTypes[ basic->kind ][ ast::BasicKind::SignedInt ];
 			    if (
 				    ( ( kind == basic->kind && basic->qualifiers >= type2->qualifiers )
@@ -649,5 +649,5 @@
 	void postvisit( const ast::EnumInstType * enumInst ) {
 		if ( enumInst->base && !enumInst->base->base ) {
-			auto basicType = new ast::BasicType( ast::BasicType::UnsignedInt );
+			auto basicType = new ast::BasicType( ast::BasicKind::UnsignedInt );
 			result = commonType( basicType, type2, tenv, need, have, open, widen);
 		}
@@ -674,5 +674,5 @@
 		} else if ( widen.second && dynamic_cast< const ast::OneType * >( type2 ) ) {
 			result = new ast::BasicType{
-				ast::BasicType::SignedInt, zero->qualifiers | type2->qualifiers };
+				ast::BasicKind::SignedInt, zero->qualifiers | type2->qualifiers };
 		} else if ( const ast::EnumInstType * enumInst = dynamic_cast< const ast::EnumInstType * >( type2 ) ) {
 			const ast::EnumDecl * enumDecl = enumInst->base;
@@ -695,5 +695,5 @@
 		} else if ( widen.second && dynamic_cast< const ast::ZeroType * >( type2 ) ) {
 			result = new ast::BasicType{
-				ast::BasicType::SignedInt, one->qualifiers | type2->qualifiers };
+				ast::BasicKind::SignedInt, one->qualifiers | type2->qualifiers };
 		} else if ( const ast::EnumInstType * enumInst = dynamic_cast< const ast::EnumInstType * >( type2 ) ) {
 			const ast::EnumDecl * enumDecl = enumInst->base;
Index: src/ResolvExpr/ConversionCost.cc
===================================================================
--- src/ResolvExpr/ConversionCost.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/ResolvExpr/ConversionCost.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -59,5 +59,5 @@
 	// GENERATED START, DO NOT EDIT
 	// GENERATED BY BasicTypes-gen.cc
-	static const int costMatrix[ast::BasicType::NUMBER_OF_BASIC_TYPES][ast::BasicType::NUMBER_OF_BASIC_TYPES] = { // path length from root to node
+	static const int costMatrix[ast::BasicKind::NUMBER_OF_BASIC_TYPES][ast::BasicKind::NUMBER_OF_BASIC_TYPES] = { // path length from root to node
 		/*               B    C   SC   UC   SI  SUI    I   UI   LI  LUI  LLI LLUI   IB  UIB  _FH  _FH   _F  _FC    F   FC  _FX _FXC   FD _FDC    D   DC F80X_FDXC  F80  _FB_FLDC   FB   LD  LDC _FBX_FLDXC */
 		/*      B */ {   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  15,  16,  17,  16,  18,  17, },
@@ -101,5 +101,5 @@
 	// GENERATED END
 	static_assert(
-		sizeof(costMatrix)/sizeof(costMatrix[0][0]) == ast::BasicType::NUMBER_OF_BASIC_TYPES * ast::BasicType::NUMBER_OF_BASIC_TYPES,
+		sizeof(costMatrix)/sizeof(costMatrix[0][0]) == ast::BasicKind::NUMBER_OF_BASIC_TYPES * ast::BasicKind::NUMBER_OF_BASIC_TYPES,
 		"Missing row in the cost matrix"
 	);
@@ -107,5 +107,5 @@
 	// GENERATED START, DO NOT EDIT
 	// GENERATED BY BasicTypes-gen.cc
-	static const int signMatrix[ast::BasicType::NUMBER_OF_BASIC_TYPES][ast::BasicType::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion
+	static const int signMatrix[ast::BasicKind::NUMBER_OF_BASIC_TYPES][ast::BasicKind::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion
 		/*               B    C   SC   UC   SI  SUI    I   UI   LI  LUI  LLI LLUI   IB  UIB  _FH  _FH   _F  _FC    F   FC  _FX _FXC   FD _FDC    D   DC F80X_FDXC  F80  _FB_FLDC   FB   LD  LDC _FBX_FLDXC */
 		/*      B */ {   0,   0,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
@@ -148,5 +148,5 @@
 	// GENERATED END
 	static_assert(
-		sizeof(signMatrix)/sizeof(signMatrix[0][0]) == ast::BasicType::NUMBER_OF_BASIC_TYPES * ast::BasicType::NUMBER_OF_BASIC_TYPES,
+		sizeof(signMatrix)/sizeof(signMatrix[0][0]) == ast::BasicKind::NUMBER_OF_BASIC_TYPES * ast::BasicKind::NUMBER_OF_BASIC_TYPES,
 		"Missing row in the sign matrix"
 	);
@@ -279,5 +279,5 @@
 		conversionCostFromBasicToBasic( basicType, dstAsBasic );
 	} else if ( dynamic_cast< const ast::EnumAttrType *>(dst) ) {
-		static ast::ptr<ast::BasicType> integer = { new ast::BasicType( ast::BasicType::SignedInt ) };
+		static ast::ptr<ast::BasicType> integer = { new ast::BasicType( ast::BasicKind::SignedInt ) };
 		cost = costCalc( basicType, integer, srcIsLvalue, symtab, env );
 	} else if ( auto dstAsEnumInst = dynamic_cast< const ast::EnumInstType * >( dst ) ) {
@@ -369,6 +369,7 @@
 			}
 		}
-	} 
-	static ast::ptr<ast::BasicType> integer = { new ast::BasicType( ast::BasicType::SignedInt ) };
+		return;
+	}
+	static ast::ptr<ast::BasicType> integer = { new ast::BasicType( ast::BasicKind::SignedInt ) };
 	cost = costCalc( integer, dst, srcIsLvalue, symtab, env );
 	if ( cost < Cost::unsafe ) {
@@ -395,5 +396,5 @@
 		    if ( cost < Cost::unsafe ) cost.incSafe();
 	    } else {
-		    static ast::ptr<ast::BasicType> integer = { new ast::BasicType( ast::BasicType::SignedInt ) };
+		    static ast::ptr<ast::BasicType> integer = { new ast::BasicType( ast::BasicKind::SignedInt ) };
 		    cost = costCalc( integer, dst, srcIsLvalue, symtab, env );
 		    if ( cost < Cost::unsafe ) {
@@ -460,5 +461,5 @@
 	} else if ( const ast::BasicType * dstAsBasic =
 			dynamic_cast< const ast::BasicType * >( dst ) ) {
-		int tableResult = costMatrix[ ast::BasicType::SignedInt ][ dstAsBasic->kind ];
+		int tableResult = costMatrix[ ast::BasicKind::SignedInt ][ dstAsBasic->kind ];
 		if ( -1 == tableResult ) {
 			cost = Cost::unsafe;
@@ -466,5 +467,5 @@
 			cost = Cost::zero;
 			cost.incSafe( tableResult + 1 );
-			cost.incSign( signMatrix[ ast::BasicType::SignedInt ][ dstAsBasic->kind ] );
+			cost.incSign( signMatrix[ ast::BasicKind::SignedInt ][ dstAsBasic->kind ] );
 		}
 		// this has the effect of letting any expr such as x+0, x+1 to be typed
@@ -492,5 +493,5 @@
 	} else if ( const ast::BasicType * dstAsBasic =
 			dynamic_cast< const ast::BasicType * >( dst ) ) {
-		int tableResult = costMatrix[ ast::BasicType::SignedInt ][ dstAsBasic->kind ];
+		int tableResult = costMatrix[ ast::BasicKind::SignedInt ][ dstAsBasic->kind ];
 		if ( -1 == tableResult ) {
 			cost = Cost::unsafe;
@@ -498,5 +499,5 @@
 			cost = Cost::zero;
 			cost.incSafe( tableResult + 1 );
-			cost.incSign( signMatrix[ ast::BasicType::SignedInt ][ dstAsBasic->kind ] );
+			cost.incSign( signMatrix[ ast::BasicKind::SignedInt ][ dstAsBasic->kind ] );
 		}
 	} else if ( auto dstAsEnumInst = dynamic_cast< const ast::EnumInstType * >( dst ) ) {
Index: src/ResolvExpr/PtrsCastable.cc
===================================================================
--- src/ResolvExpr/PtrsCastable.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/ResolvExpr/PtrsCastable.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -100,5 +100,5 @@
 				result = 1;
 			} else if ( auto bt = dynamic_cast< const ast::BasicType * >( dst ) ) {
-				if ( bt->kind == ast::BasicType::SignedInt ) {
+				if ( bt->kind == ast::BasicKind::SignedInt ) {
 					result = 0;
 				} else {
Index: src/ResolvExpr/ResolveTypeof.cc
===================================================================
--- src/ResolvExpr/ResolveTypeof.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/ResolvExpr/ResolveTypeof.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -63,5 +63,5 @@
 			if ( newType.as< ast::EnumInstType >() ) {
 				newType = new ast::BasicType(
-					ast::BasicType::SignedInt, newType->qualifiers, copy(newType->attributes) );
+					ast::BasicKind::SignedInt, newType->qualifiers, copy(newType->attributes) );
 			}
 			reset_qualifiers(
@@ -91,5 +91,5 @@
 		auto mutType = mutate(arrayType);
 		auto globalSizeType = context.global.sizeType;
-		ast::ptr<ast::Type> sizetype = globalSizeType ? globalSizeType : new ast::BasicType(ast::BasicType::LongUnsignedInt);
+		ast::ptr<ast::Type> sizetype = globalSizeType ? globalSizeType : new ast::BasicType( ast::BasicKind::LongUnsignedInt );
 		mutType->dimension = findSingleExpression(arrayType->dimension, sizetype, context );
 
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/ResolvExpr/Resolver.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -351,7 +351,7 @@
 	bool isCharType( const ast::Type * t ) {
 		if ( auto bt = dynamic_cast< const ast::BasicType * >( t ) ) {
-			return bt->kind == ast::BasicType::Char
-				|| bt->kind == ast::BasicType::SignedChar
-				|| bt->kind == ast::BasicType::UnsignedChar;
+			return bt->kind == ast::BasicKind::Char
+				|| bt->kind == ast::BasicKind::SignedChar
+				|| bt->kind == ast::BasicKind::UnsignedChar;
 		}
 		return false;
@@ -458,5 +458,5 @@
 			if (attr->params.size() == 1) {
 				auto arg = attr->params.front();
-				auto resolved = ResolvExpr::findSingleExpression( arg, new ast::BasicType( ast::BasicType::LongLongSignedInt ), context );
+				auto resolved = ResolvExpr::findSingleExpression( arg, new ast::BasicType( ast::BasicKind::LongLongSignedInt ), context );
 				auto result = eval(arg);
 
@@ -624,5 +624,5 @@
 			objectDecl = fixObjectType( objectDecl, context );
 			currentObject = ast::CurrentObject{
-				objectDecl->location, new ast::BasicType{ ast::BasicType::SignedInt } };
+				objectDecl->location, new ast::BasicType{ ast::BasicKind::SignedInt } };
 		}
 	} else {
@@ -1095,5 +1095,5 @@
 		// resolve the timeout as a size_t, the conditions like IfStmt, and stmts normally
 		ast::ptr< ast::Type > target =
-			new ast::BasicType{ ast::BasicType::LongLongUnsignedInt };
+			new ast::BasicType{ ast::BasicKind::LongLongUnsignedInt };
 		auto timeout_time = findSingleExpression( stmt->timeout_time, target, context );
 		auto timeout_cond = findCondExpression( stmt->timeout_cond, context );
Index: src/SymTab/GenImplicitCall.cpp
===================================================================
--- src/SymTab/GenImplicitCall.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/SymTab/GenImplicitCall.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -133,5 +133,5 @@
 
 	ast::ptr< ast::DeclWithType > index = new ast::ObjectDecl(
-		loc, indexName.newName(), new ast::BasicType( ast::BasicType::SignedInt ),
+		loc, indexName.newName(), new ast::BasicType( ast::BasicKind::SignedInt ),
 		new ast::SingleInit( loc, begin ) );
 	ast::ptr< ast::Expr > indexVar = new ast::VariableExpr( loc, index );
Index: src/SymTab/Mangler.cc
===================================================================
--- src/SymTab/Mangler.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/SymTab/Mangler.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -142,5 +142,5 @@
 void Mangler::postvisit( const ast::BasicType * basicType ) {
 	printQualifiers( basicType );
-	assertf( basicType->kind < ast::BasicType::NUMBER_OF_BASIC_TYPES, "Unhandled basic type: %d", basicType->kind );
+	assertf( basicType->kind < ast::BasicKind::NUMBER_OF_BASIC_TYPES, "Unhandled basic type: %d", basicType->kind );
 	mangleName += Encoding::basicTypes[ basicType->kind ];
 }
Index: src/SymTab/ManglerCommon.cc
===================================================================
--- src/SymTab/ManglerCommon.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/SymTab/ManglerCommon.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -41,5 +41,5 @@
 //   - "Di" char32_t
 //   - "Ds" char16_t
-const std::string basicTypes[ast::BasicType::NUMBER_OF_BASIC_TYPES] = {
+const std::string basicTypes[ast::BasicKind::NUMBER_OF_BASIC_TYPES] = {
 	"b",        // _Bool
 	"c",        // char
@@ -81,5 +81,5 @@
 // GENERATED END
 static_assert(
-	sizeof(basicTypes) / sizeof(basicTypes[0]) == ast::BasicType::NUMBER_OF_BASIC_TYPES,
+	sizeof(basicTypes) / sizeof(basicTypes[0]) == ast::BasicKind::NUMBER_OF_BASIC_TYPES,
 	"Each basic type kind should have a corresponding mangler letter"
 );
Index: src/Tuples/TupleAssignment.cc
===================================================================
--- src/Tuples/TupleAssignment.cc	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Tuples/TupleAssignment.cc	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -35,4 +35,5 @@
 #include "InitTweak/GenInit.h"             // for genCtorInit
 #include "InitTweak/InitTweak.h"           // for getPointerBase, isAssignment
+#include "ResolvExpr/CandidateFinder.hpp"  // for CandidateFinder
 #include "ResolvExpr/Cost.h"               // for Cost
 #include "ResolvExpr/Resolver.h"           // for resolveCtorInit
Index: src/Tuples/TupleExpansion.cpp
===================================================================
--- src/Tuples/TupleExpansion.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Tuples/TupleExpansion.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -106,5 +106,5 @@
 			assignUnq = commaExpr->arg1;
 		}
-		auto finished = new ast::ObjectDecl( loc, toString( "_unq", id, "_finished_" ), new ast::BasicType( ast::BasicType::Kind::Bool ),
+		auto finished = new ast::ObjectDecl( loc, toString( "_unq", id, "_finished_" ), new ast::BasicType( ast::BasicKind::Bool ),
 			new ast::SingleInit( loc, ast::ConstantExpr::from_int( loc, 0 ) ), {}, ast::Linkage::Cforall );
 		declsToAddBefore.push_back( finished );
@@ -175,5 +175,5 @@
 			new ast::ObjectDecl( location,
 				"dummy",
-				new ast::BasicType( ast::BasicType::SignedInt ),
+				new ast::BasicType( ast::BasicKind::SignedInt ),
 				nullptr,
 				ast::Storage::Classes(),
Index: src/Tuples/Tuples.h
===================================================================
--- src/Tuples/Tuples.h	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Tuples/Tuples.h	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -21,5 +21,7 @@
 #include "AST/Fwd.hpp"
 #include "AST/Node.hpp"
-#include "ResolvExpr/CandidateFinder.hpp"
+namespace ResolvExpr {
+	class CandidateFinder;
+}
 
 namespace Tuples {
Index: src/Validate/GenericParameter.cpp
===================================================================
--- src/Validate/GenericParameter.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Validate/GenericParameter.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -289,5 +289,5 @@
 		return new ast::TypeExpr( expr->location,
 			new ast::ArrayType(
-				new ast::BasicType( ast::BasicType::Char ),
+				new ast::BasicType( ast::BasicKind::Char ),
 				expr,
 				ast::VariableLen,
Index: src/Validate/ImplementEnumFunc.cpp
===================================================================
--- src/Validate/ImplementEnumFunc.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Validate/ImplementEnumFunc.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -305,5 +305,5 @@
         {new ast::ObjectDecl(
             getLocation(), "_ret",
-            new ast::PointerType(new ast::BasicType{ast::BasicType::Char}))});
+            new ast::PointerType(new ast::BasicType{ast::BasicKind::Char}))});
 }
 
@@ -358,5 +358,5 @@
         attr == ast::EnumAttribute::Value
             ? decl->base
-            : new ast::PointerType(new ast::BasicType{ast::BasicType::Char}),
+            : new ast::PointerType(new ast::BasicType{ast::BasicKind::Char}),
         ast::ConstantExpr::from_int(decl->location, decl->members.size()),
         ast::LengthFlag::FixedLen, ast::DimensionFlag::DynamicDim);
Index: src/Validate/ReplaceTypedef.cpp
===================================================================
--- src/Validate/ReplaceTypedef.cpp	(revision 748c7516ae55669d37dd519860c23a7cc8c8632b)
+++ src/Validate/ReplaceTypedef.cpp	(revision 38093ae64b024ab4c59bfa2d4555f10ec56e103e)
@@ -349,5 +349,5 @@
 		// Perhaps this should be a warning instead.
 		translationUnit.global.sizeType =
-			new ast::BasicType( ast::BasicType::LongUnsignedInt );
+			new ast::BasicType( ast::BasicKind::LongUnsignedInt );
 	}
 }
