summaryrefslogtreecommitdiff
path: root/dhall/src/normalize.rs
diff options
context:
space:
mode:
authorNadrieril2019-04-06 20:50:57 +0200
committerNadrieril2019-04-06 20:50:57 +0200
commit7983c43210f5fcaa439fa1c6742e72252652e4f4 (patch)
tree28d88eaa2e0a35d2d3867994b88afeff1eb910d4 /dhall/src/normalize.rs
parent412d0fac51b7b51aabcb049e3d6ba52f3dda1529 (diff)
Thread Typed through type_with
Diffstat (limited to 'dhall/src/normalize.rs')
-rw-r--r--dhall/src/normalize.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs
index 24a8601..8ed2136 100644
--- a/dhall/src/normalize.rs
+++ b/dhall/src/normalize.rs
@@ -1,8 +1,18 @@
#![allow(non_snake_case)]
+use crate::expr::*;
use dhall_core::*;
use dhall_generator::dhall_expr;
use std::fmt;
+impl Typed {
+ pub fn normalize(self) -> Normalized {
+ Normalized(normalize(self.0))
+ }
+ pub fn get_type(&self) -> &Type {
+ &self.1
+ }
+}
+
fn apply_builtin<S, A>(b: Builtin, args: &Vec<Expr<S, A>>) -> WhatNext<S, A>
where
S: fmt::Debug + Clone,