Examples of rootTypeConsApp()


Examples of org.openquark.cal.compiler.TypeExpr.rootTypeConsApp()

                // we can simply use the field accessor.  Otherwise we need to apply output to
                // resulting value.
                TypeExpr fieldTypeExpr = dcFieldTypeExprs[i];
                updateInputableImports(fieldTypeExpr);
                String dcFieldTypeConsName = "";
                TypeConsApp typeConsApp = fieldTypeExpr.rootTypeConsApp();
                if (typeConsApp != null) {
                    TypeConstructor tc = typeConsApp.getRoot();
                    dcFieldTypeConsName = tc.getName().toString();
                }
View Full Code Here

Examples of org.openquark.cal.compiler.TypeExpr.rootTypeConsApp()

                updateInputableImports(fieldTypeExpr);
               
                TypeExprDefn fieldTypeForGetter = getTypeExprDefn(new JavaTypeName[]{fieldType});
                String fieldTypeForGetterTypeConsName = ((TypeExprDefn.TypeCons)fieldTypeForGetter).getTypeConsName().toString();
                String dcFieldTypeConsName = "";
                TypeConsApp typeConsApp = fieldTypeExpr.rootTypeConsApp();
                if (typeConsApp != null) {
                    TypeConstructor tc = typeConsApp.getRoot();
                    dcFieldTypeConsName = tc.getName().toString();
                }
               
View Full Code Here

Examples of org.openquark.cal.compiler.TypeExpr.rootTypeConsApp()

            for (int i = 0, n = module.getNClassInstances(); i < n; ++i) {
                ClassInstance ci = module.getNthClassInstance(i);
                if (ci.getTypeClass().getName().equals(className)) {
                    // Check the instance type
                    TypeExpr instanceTypeExpr = ci.getType();
                    TypeConsApp tca = instanceTypeExpr.rootTypeConsApp();
                    if (tca != null) {
                        if (tca.getRoot().getName().equals(typeConstructorName)) {
                            return module;
                        }
                    }
View Full Code Here

Examples of org.openquark.cal.compiler.TypeExpr.rootTypeConsApp()

        for (int i = 0, n = typeCons.getNDataConstructors(); i < n; ++i) {
            DataConstructor dc = typeCons.getNthDataConstructor(i);
            TypeExpr[] fieldTypes = SCJavaDefn.getFieldTypesForDC(dc);
            for (int j = 0, k = fieldTypes.length; j < k; ++j) {
                TypeExpr fieldType = fieldTypes[j];
                TypeConsApp fieldTc = fieldType.rootTypeConsApp();
                if (fieldTc != null &&
                    (typeConsApp.sameType(fieldTc) || fieldTc.getRoot().equals(typeCons))) {
                    return true;
                }
            }
View Full Code Here

Examples of org.openquark.cal.compiler.TypeExpr.rootTypeConsApp()

               
            } else if (typeIde.equals(CAL_Prelude.TypeConstructors.List)) {
              
                TypeExpr elementTypeExpr = typeConsApp.getArg(0);

                TypeConsApp elementTypeConsApp = elementTypeExpr.rootTypeConsApp();

                if (elementTypeConsApp != null) {

                    QualifiedName elementIde = elementTypeConsApp.getName();
View Full Code Here

Examples of org.openquark.cal.compiler.TypeExpr.rootTypeConsApp()

                baseline = "Prelude.FunctionName";

            } else if (typeConsName.equals(CAL_Prelude.TypeConstructors.List)) {

                TypeExpr elementTypeExpr = typeConsApp.getArg(0);
                TypeConsApp elementTypeConsApp = elementTypeExpr.rootTypeConsApp();

                if (elementTypeConsApp != null) {

                    QualifiedName elementTypeConsName = elementTypeConsApp.getName();
View Full Code Here

Examples of org.openquark.cal.compiler.TypeExpr.rootTypeConsApp()

        if (typeExpr.sameType(typeConstants.getCharType())) {
           
            valueFieldKeyListener = new CharTypeKeyListener();
            ivjValueField.addKeyListener(valueFieldKeyListener);
       
        } else if (typeExpr.rootTypeConsApp() != null) {
           
            QualifiedName typeConsName = typeExpr.rootTypeConsApp().getName();
           
            if (valueEditorManager.getPerspective().isEnumDataType(typeConsName)) {
               
View Full Code Here

Examples of org.openquark.cal.compiler.TypeExpr.rootTypeConsApp()

            valueFieldKeyListener = new CharTypeKeyListener();
            ivjValueField.addKeyListener(valueFieldKeyListener);
       
        } else if (typeExpr.rootTypeConsApp() != null) {
           
            QualifiedName typeConsName = typeExpr.rootTypeConsApp().getName();
           
            if (valueEditorManager.getPerspective().isEnumDataType(typeConsName)) {
               
                valueFieldKeyListener = new EnumTypeKeyListener();
                ivjValueField.addKeyListener(valueFieldKeyListener);
View Full Code Here

Examples of org.openquark.cal.compiler.TypeExpr.rootTypeConsApp()

                ClassInstance ci = module.getNthClassInstance(j);
                if (ci.getTypeClass().getName().equals(CAL_Prelude.TypeClasses.Inputable) ||
                    ci.getTypeClass().getName().equals(CAL_Prelude.TypeClasses.Outputable)) {
                    // Check the instance type
                    TypeExpr instanceTypeExpr = ci.getType();
                    TypeConsApp tca = instanceTypeExpr.rootTypeConsApp();
                    if (tca != null) {
                        if (tca.getRoot().getName().equals(tc.getName())) {
                            alreadyInputableOutputable = true;
                        }
                    }
View Full Code Here

Examples of org.openquark.cal.compiler.TypeExpr.rootTypeConsApp()

        private final List<ValueNode> valueNodeList = new ArrayList<ValueNode>();
       
        public EnumTypeKeyListener() {
           
            TypeExpr typeExpr = getValueNode().getTypeExpr();
            QualifiedName typeConsName = typeExpr.rootTypeConsApp().getName();
           
            if (!valueEditorManager.getPerspective().isEnumDataType(typeConsName)) {
                throw new IllegalStateException("type is not an enumerated type: " + typeConsName);
            }
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.