diff options
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util.rs b/src/util.rs index 70bd8e4..4b47afc 100644 --- a/src/util.rs +++ b/src/util.rs @@ -65,3 +65,15 @@ pub const Unit: Type = Type::Unit; pub const Bool: Type = Type::Boolean; pub const Nat: Type = Type::Natural; pub const Int: Type = Type::Integer; + +pub fn Float(term: f32) -> Term { + return Term::Float(term) +} + +pub fn Str(len: usize, cap: usize, data: Vec<usize>) -> Term { + return Term::String { len, cap, data } +} + +pub fn Enum(val: usize, data: Vec<Type>) -> Term { + return Term::Enum { val, data } +} |