diff options
author | Nadrieril | 2020-02-09 21:58:28 +0000 |
---|---|---|
committer | Nadrieril | 2020-02-09 21:58:28 +0000 |
commit | 21db63d3e614554f258526182c7ed89a2c244b65 (patch) | |
tree | b222217123f53774e2c5c70160c3fc48e08045fc /dhall/src/semantics/nze | |
parent | a709c65eb28f1b6a666f15bfc2255da7bc7105ab (diff) |
Take Hir for typecheck
Diffstat (limited to 'dhall/src/semantics/nze')
-rw-r--r-- | dhall/src/semantics/nze/value.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dhall/src/semantics/nze/value.rs b/dhall/src/semantics/nze/value.rs index a771b91..48acdb5 100644 --- a/dhall/src/semantics/nze/value.rs +++ b/dhall/src/semantics/nze/value.rs @@ -327,9 +327,12 @@ impl Value { Hir::new(hir, self.0.span.clone()) } + pub fn to_hir_noenv(&self) -> Hir { + self.to_hir(VarEnv::new()) + } pub fn to_tyexpr_tyenv(&self, tyenv: &TyEnv) -> TyExpr { - let expr = self.to_hir(tyenv.as_varenv()).to_expr_tyenv(tyenv); - type_with(tyenv, &expr).unwrap() + let hir = self.to_hir(tyenv.as_varenv()); + type_with(tyenv, &hir).unwrap() } pub fn to_tyexpr_noenv(&self) -> TyExpr { self.to_tyexpr_tyenv(&TyEnv::new()) |