From 7983c43210f5fcaa439fa1c6742e72252652e4f4 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 6 Apr 2019 20:50:57 +0200 Subject: Thread Typed through type_with --- dhall/src/normalize.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'dhall/src/normalize.rs') 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(b: Builtin, args: &Vec>) -> WhatNext where S: fmt::Debug + Clone, -- cgit v1.2.3