From 6fdae6f8026fe9357de63c5557676f4def3eaf92 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 13 Mar 2020 16:16:56 +0000 Subject: Remove Normalized and friends from public API --- dhall/src/simple.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dhall/src/simple.rs') diff --git a/dhall/src/simple.rs b/dhall/src/simple.rs index 9d3846e..014053e 100644 --- a/dhall/src/simple.rs +++ b/dhall/src/simple.rs @@ -1,7 +1,7 @@ use std::collections::BTreeMap; use crate::syntax::{Builtin, LitKind}; -use crate::Normalized; +use crate::{Normalized, Value}; #[derive(Debug, Clone, PartialEq, Eq)] pub struct SimpleValue { @@ -56,7 +56,10 @@ impl SimpleType { pub fn kind(&self) -> &STyKind { self.kind.as_ref() } - pub fn into_normalized(self) -> Normalized { + pub fn to_value(&self) -> Value { + self.clone().into_normalized().to_value() + } + fn into_normalized(self) -> Normalized { match *self.kind { STyKind::Bool => Normalized::make_builtin_type(Builtin::Bool), STyKind::Natural => Normalized::make_builtin_type(Builtin::Natural), -- cgit v1.2.3