Affine type system