diff options
author | JJ | 2023-04-13 07:20:06 +0000 |
---|---|---|
committer | JJ | 2023-04-13 07:21:28 +0000 |
commit | 5ae010fef48cc2bf83a0d366d2a1cfa74ecce278 (patch) | |
tree | 2241dcec8d38d16e2314e94b4dec0ed61e20d922 /src/util.rs | |
parent | 188631f3bb263700c34d578af5968ab80e699485 (diff) |
major cleanups: extend Type, refactor Term, and switch to String errs
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/util.rs b/src/util.rs index 5011ac7..70bd8e4 100644 --- a/src/util.rs +++ b/src/util.rs @@ -13,10 +13,6 @@ pub fn unique_ident(count: &mut u8) -> String { } } -pub fn Term(val: Value, kind: Type) -> Term { - return Term {val, kind}; -} - pub fn Ann(expr: Expression, kind: Type) -> Expression { return Expression::Annotation { expr: Box::new(expr), @@ -24,10 +20,8 @@ pub fn Ann(expr: Expression, kind: Type) -> Expression { }; } -pub fn Const(val: Value) -> Expression { - return Expression::Constant { - term: Term {val, kind: Type::Empty} - }; +pub fn Const(term: Term) -> Expression { + return Expression::Constant { term }; } pub fn Var(id: &str) -> Expression { |