package scotch.data.int_;
import static scotch.runtime.RuntimeSupport.applicable;
import static scotch.runtime.RuntimeSupport.callable;
import static scotch.symbol.type.TypeDescriptors.fn;
import static scotch.symbol.type.TypeDescriptors.sum;
import java.util.List;
import com.google.common.collect.ImmutableList;
import scotch.runtime.Applicable;
import scotch.symbol.DataType;
import scotch.symbol.TypeParameters;
import scotch.symbol.Value;
import scotch.symbol.ValueType;
import scotch.symbol.type.TypeDescriptor;
@SuppressWarnings("unused")
@DataType(memberName = "Int")
public class Int {
public static TypeDescriptor TYPE = sum("scotch.data.int.Int");
@TypeParameters
public static List<TypeDescriptor> parameters() {
return ImmutableList.of();
}
@Value(memberName = "intDiv")
public static Applicable<Integer, Applicable<Integer, Integer>> intDiv() {
return applicable(left -> applicable(right -> callable(() -> left.call() / right.call())));
}
@ValueType(forMember = "intDiv")
public static TypeDescriptor intDiv$type() {
return fn(TYPE, fn(TYPE, TYPE));
}
@Value(memberName = "intMod")
public static Applicable<Integer, Applicable<Integer, Integer>> intMod() {
return applicable(left -> applicable(right -> callable(() -> left.call() % right.call())));
}
@ValueType(forMember = "intMod")
public static TypeDescriptor intMod$type() {
return fn(TYPE, fn(TYPE, TYPE));
}
}