protected static Expr coerce(Expr expr, Type type, Type target, boolean explicit) {
		Expr result;

		if(type.equals(target))
			result = expr;
		else
		if(type instanceof NumericType && target instanceof NumericType) {
			NumericType ntype=(NumericType) type;
			NumericType ntarget=(NumericType) target;
			if(ntype.getPrecision()<ntarget.getPrecision() || explicit) {
				if(ntype.equals(Type.INT) && ntarget.equals(Type.FLOAT))
					result = new IntToFloatExpr(expr);
				else
				if(ntype.equals(Type.FLOAT) && ntarget.equals(Type.INT))
					result = new FloatToIntExpr(expr);
				else
					throw new InternalCompilationStorkException("Asked to coerce unrecognized numeric type(s) `"+type.getText()+"' to `"+target.getText()+"'"); 
			}
			else
				throw new PrecisionLossException(type, target);
		}
		else
			throw new IncompatibleTypesException(type, target);
		
		return result;
	}