diff options
author | Nadrieril | 2020-03-13 16:16:56 +0000 |
---|---|---|
committer | Nadrieril | 2020-03-31 21:44:01 +0100 |
commit | 6fdae6f8026fe9357de63c5557676f4def3eaf92 (patch) | |
tree | 2281e9894a18a183980d4b033e00e95d9a633a05 /dhall/src/simple.rs | |
parent | 60425d58151fef142b066d523dc4d5e832070b9c (diff) |
Remove Normalized and friends from public API
Diffstat (limited to 'dhall/src/simple.rs')
-rw-r--r-- | dhall/src/simple.rs | 7 |
1 files changed, 5 insertions, 2 deletions
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), |