code: public <T extends Type> T asType(Type type, Class<T> kind) {
  		if (kind.isInstance(type)) {
  			return (T) type;
  		} else if (type instanceof Type.Nominal) {
  			Type.Nominal t = (Type.Nominal) type;
  			Decl.Type decl = t.getLink().getTarget();
  			return asType(decl.getType(), kind);
  		} else {
  			throw new IllegalArgumentException("invalid type: " + type);
  		}
  	}
docs: Unwrap a given type to reveal its underlying kind. For example, the type
  <code>int</code> can be unwrapped only to <code>int</code>. A more complex
  example:
  
  <pre>
  type nat is (int x) where x >= 0
  </pre>
  
  The type <code>nat</code> can be unwrapped to an <code>int</code>. In
  general, the unwrapping process expands all nominal types until an atom is
  encountered.
  
  @param type
  @param kind
  @return