aboutsummaryrefslogtreecommitdiff
path: root/src/type/util.rs
blob: 9be8c6e55a65f21a81df3de6777b69bce10ea108 (plain)
1
2
3
4
5
6
7
8
9
10
11

use crate::r#type::{*, Type::*};

pub fn arr(a: impl Into<Box<Type>>, b: impl Into<Box<Type>>) -> Type {
    Arrow(a.into(), b.into())
}

pub fn vt(name: &str) -> Type {
    VarType(name.to_string())
}