Package wyil.lang

Examples of wyil.lang.Type$Record$State


    public ArrayList<Nominal> elements() {
      ArrayList<Nominal> r = new ArrayList<Nominal>();
      java.util.List<Type> rawElements = raw.elements();
      java.util.List<Type> nominalElements = nominal.elements();
      for(int i=0;i!=rawElements.size();++i) {
        Type nominalElement = nominalElements.get(i);
        Type rawElement = rawElements.get(i);
        r.add(construct(nominalElement,rawElement));
      }
      return r;
    }
View Full Code Here


    public HashMap<String,Nominal> fields() {
      HashMap<String,Nominal> r = new HashMap<String,Nominal>();
      HashMap<String,Type> nominalFields = nominal.fields();
      for(java.util.Map.Entry<String, Type> e : raw.fields().entrySet()) {
        String key = e.getKey();
        Type rawField = e.getValue();
        Type nominalField = nominalFields.get(key);
        r.put(e.getKey(), Nominal.construct(nominalField,rawField));
      }
      return r;
    }
View Full Code Here

      }
      return r;
    }

    public Nominal field(String field) {
      Type rawField = raw.fields().get(field);
      if(rawField == null) {
        return null;
      } else {
        return construct(nominal.fields().get(field),rawField);
      }
View Full Code Here

    public HashMap<String,Nominal> fields() {
      HashMap<String,Nominal> r = new HashMap<String,Nominal>();
      HashMap<String,Type> nominalFields = nominal.fields();
      for(java.util.Map.Entry<String, Type> e : raw.fields().entrySet()) {
        String key = e.getKey();
        Type rawField = e.getValue();
        Type nominalField = nominalFields.get(key);
        r.put(e.getKey(), Nominal.construct(nominalField,rawField));
      }
      return r;
    }
View Full Code Here

      }
      return r;
    }

    public Nominal field(String field) {
      Type rawField = raw.fields().get(field);
      if(rawField == null) {
        return null;
      } else {
        return construct(nominal.fields().get(field),rawField);
      }
View Full Code Here

    public java.util.List<Nominal> params() {
      ArrayList<Nominal> r = new ArrayList<Nominal>();
      java.util.List<Type> rawElements = raw.params();
      java.util.List<Type> nominalElements = nominal.params();
      for(int i=0;i!=rawElements.size();++i) {
        Type nominalElement = nominalElements.get(i);
        Type rawElement = rawElements.get(i);
        r.add(construct(nominalElement,rawElement));
      }
      return r;
    }
View Full Code Here

    public java.util.List<Nominal> params() {
      ArrayList<Nominal> r = new ArrayList<Nominal>();
      java.util.List<Type> rawElements = raw.params();
      java.util.List<Type> nominalElements = nominal.params();
      for(int i=0;i!=rawElements.size();++i) {
        Type nominalElement = nominalElements.get(i);
        Type rawElement = rawElements.get(i);
        r.add(construct(nominalElement,rawElement));
      }
      return r;
    }
View Full Code Here

    // No child subsumes type.  So construct its child set.
    ArrayList<Node> nchildren = new ArrayList<Node>();
    for(int i=0;i!=children.size();) {
      Node n = children.get(i);
      Type nType = n.type;
      if(Type.isSubtype(type,nType)) {
        if(nType.equals(type)) {
          if(n.constraint != null) {
            String nextLabel = CodeUtils.freshLabel();
            Code.Block blk = chainBlock(nextLabel, n.constraint);
            blk.add(Codes.Label(nextLabel));
            blk.addAll(constraint);
View Full Code Here

      return new Base(nominal,raw);
    }
  }

  public static Nominal intersect(Nominal lhs, Nominal rhs) {
    Type nominal = Type.intersect(lhs.nominal(),rhs.nominal());
    Type raw = Type.intersect(lhs.raw(),rhs.raw());
    return Nominal.construct(nominal, raw);
  }
View Full Code Here

    Type.Record raw = Type.Record(isOpen,rawFields);
    return new Record(nominal,raw);
  }

  public static Nominal Union(Nominal t1, Nominal t2) {
    Type nominal = Type.Union(t1.nominal(),t2.nominal());
    Type raw = Type.Union(t1.raw(),t2.raw());
    return construct(nominal,raw);
  }
View Full Code Here

TOP

Related Classes of wyil.lang.Type$Record$State

Copyright © 2018 www.massapicom. 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.