Examples of rootTypeVar()


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

        Map<ValueNode, TypeExpr> returnMap = new HashMap<ValueNode, TypeExpr>();

        // Calculate the type of the parent value editor node
       
        TypeExpr contextType = getContext().getLeastConstrainedTypeExpr();
        if (contextType.rootTypeVar() != null) {
            // ValueGem is not bound to a context, so the type should be the parametric range type
           
            // Retrieve the default type expression of the parent editor node.
            //
            // This is retrieved from the type of the supercombinator constructing
View Full Code Here

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

    private Map<ValueNode, TypeExpr> getValueNodeToUnconstrainedTypeMap() {
       
        Map<ValueNode, TypeExpr> returnMap = new HashMap<ValueNode, TypeExpr>();

        TypeExpr leastConstrainedType = getContext().getLeastConstrainedTypeExpr();
        if (leastConstrainedType.rootTypeVar() != null) {
            leastConstrainedType = getDataConstructor().getTypeExpr().getResultType();
        }
       
        returnMap.put(getValueNode(), leastConstrainedType);
               
View Full Code Here

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

            //   in the GemCutter to display as a 1 argument gem with output type Int -> [a], but the overall type of the burnt take gem is
            //   is [a] -> (Int -> [a]) which is just [a] -> Int -> [a] (-> is right associative) and has result type [a], as with the unburnt
            //   take gem.          
           
            TypeExpr destResultTypeExpr = destType.getResultType();
            if (destResultTypeExpr.rootTypeVar() == null && !TypeExpr.canUnifyType(destResultTypeExpr, outputType.getResultType(), info.getModuleTypeInfo())) {
                //only do the check if the destination result type is a type constructor or record type.
                //the reason for this is that if it is a parameteric type, we are likely to succeed here...
                doNotTryBurning = true;
            }
        }
View Full Code Here

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

        //
        // This is currently not possible because the type switching mechanism does not
        // properly update a record type switch form record-polymorphic to non-record-polymorphic.
       
        TypeExpr contextRecordType = getContext().getLeastConstrainedTypeExpr();
        if (contextRecordType.rootTypeVar() != null) {
        
            if (getValueNode().getTypeExpr().rootRecordType().isRecordPolymorphic()) {
           
                // Not constrained by context, so create new type expression according to the fields we have
               
View Full Code Here

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

            // This is currently not possible because the type switching mechanism does not
            // properly update a record type switch form record-polymorphic to non-record-polymorphic.
           
            TypeExpr unconstrainedListType = getContext().getLeastConstrainedTypeExpr();
           
            if (unconstrainedListType.rootTypeVar() != null ||
                unconstrainedListType.rootTypeConsApp().getArg(0).rootTypeVar() != null) {

                // Not constrained by context, so create new type expression according to the fields we have
               
                if (getListElementType().rootRecordType().isRecordPolymorphic()) {
View Full Code Here

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

        // Populate the map
       
        // Tuple
        TypeExpr unconstrainedTupleType = getContext().getLeastConstrainedTypeExpr();
        if (unconstrainedTupleType.rootTypeVar() != null) {
            // not constrained by the context to be a tuple
            unconstrainedTupleType = TypeExpr.makeTupleType(tupleSize);
        }
        returnMap.put(currentTupleValue, unconstrainedTupleType);
       
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.