about summary refs log tree commit diff
path: root/src/commands/check.rs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2021-03-14T20·43-0400
committerGriffin Smith <root@gws.fyi>2021-03-14T20·43-0400
commitecb4c0f803e9b408e4fd21c475769eb4dc649d14 (patch)
tree80390b00a6009cea21fbb68cbf56e6a193b478a2 /src/commands/check.rs
parent7960c3270e1a338f4da40d044a6896df96d82c79 (diff)
Universally quantified type variables
Implement universally quantified type variables, both explicitly given
by the user and inferred by the type inference algorithm.
Diffstat (limited to 'src/commands/check.rs')
-rw-r--r--src/commands/check.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/check.rs b/src/commands/check.rs
index 40de288a282c..0bea482c1478 100644
--- a/src/commands/check.rs
+++ b/src/commands/check.rs
@@ -15,13 +15,13 @@ pub struct Check {
     expr: Option<String>,
 }
 
-fn run_expr(expr: String) -> Result<Type> {
+fn run_expr(expr: String) -> Result<Type<'static>> {
     let (_, parsed) = parser::expr(&expr)?;
     let hir_expr = tc::typecheck_expr(parsed)?;
-    Ok(hir_expr.type_().clone())
+    Ok(hir_expr.type_().to_owned())
 }
 
-fn run_path(path: PathBuf) -> Result<Type> {
+fn run_path(path: PathBuf) -> Result<Type<'static>> {
     todo!()
 }