final List<ClassTypeInfo> dataTypes = new ArrayList<ClassTypeInfo>();
for (final TypeExpr typePiece : functionalAgentType.getTypePieces()) {
if (typePiece instanceof TypeConsApp) {
final TypeConsApp typeConsApp = (TypeConsApp)typePiece;
final ForeignTypeInfo foreignTypeInfo = typeConsApp.getForeignTypeInfo();
if (foreignTypeInfo != null && isScopeVisibleAsJavaLibraryAPI(foreignTypeInfo.getImplementationVisibility())) {
// we use the implementation type if the type is foreign and the implementation is visible
dataTypes.add(ClassTypeInfo.make(foreignTypeInfo.getForeignType()));
} else if (typeConsApp.isNonParametricType(CAL_Prelude.TypeConstructors.Boolean)) {
// Special handling required for Prelude.Boolean - it an algebraic type that has a custom RTData representation
dataTypes.add(ClassTypeInfo.make(boolean.class));
} else {
dataTypes.add(ClassTypeInfo.makeNonForeign());