summaryrefslogtreecommitdiff
path: root/serde_dhall/src
diff options
context:
space:
mode:
authorNadrieril2019-08-17 19:00:43 +0200
committerNadrieril2019-08-17 19:06:06 +0200
commit6753a1f97bb674d91dd4d42f2ddb25a8119e070d (patch)
tree56ebbfb08d4e7ad41565fcd38507e7d8cd4f8739 /serde_dhall/src
parent8dec798929f35df15a7bc3a6caa4f0c7954c4ffc (diff)
s/Thunk/Value/
Diffstat (limited to 'serde_dhall/src')
-rw-r--r--serde_dhall/src/lib.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/serde_dhall/src/lib.rs b/serde_dhall/src/lib.rs
index 49fd40e..48f311e 100644
--- a/serde_dhall/src/lib.rs
+++ b/serde_dhall/src/lib.rs
@@ -124,8 +124,9 @@ pub use value::Value;
// A Dhall value.
pub mod value {
- use dhall::core::thunk::{Thunk, TypedThunk};
- use dhall::core::value::ValueF as DhallValue;
+ use dhall::core::value::TypedValue as TypedThunk;
+ use dhall::core::value::Value as Thunk;
+ use dhall::core::valuef::ValueF as DhallValue;
use dhall::phase::{NormalizedSubExpr, Parsed, Type, Typed};
use dhall_syntax::Builtin;
@@ -153,8 +154,8 @@ pub mod value {
pub(crate) fn to_expr(&self) -> NormalizedSubExpr {
self.0.to_expr()
}
- pub(crate) fn to_thunk(&self) -> Thunk {
- self.0.to_thunk()
+ pub(crate) fn to_value(&self) -> Thunk {
+ self.0.to_value()
}
pub(crate) fn to_type(&self) -> Type {
self.0.to_type()
@@ -170,12 +171,12 @@ pub mod value {
pub(crate) fn make_optional_type(t: Value) -> Self {
Self::make_simple_type(
DhallValue::from_builtin(Builtin::Optional)
- .app_thunk(t.to_thunk()),
+ .app_value(t.to_value()),
)
}
pub(crate) fn make_list_type(t: Value) -> Self {
Self::make_simple_type(
- DhallValue::from_builtin(Builtin::List).app_thunk(t.to_thunk()),
+ DhallValue::from_builtin(Builtin::List).app_value(t.to_value()),
)
}
// Made public for the StaticType derive macro
@@ -185,7 +186,7 @@ pub mod value {
) -> Self {
Self::make_simple_type(DhallValue::RecordType(
kts.map(|(k, t)| {
- (k.into(), TypedThunk::from_thunk_simple_type(t.to_thunk()))
+ (k.into(), TypedThunk::from_value_simple_type(t.to_value()))
})
.collect(),
))
@@ -199,7 +200,7 @@ pub mod value {
(
k.into(),
t.map(|t| {
- TypedThunk::from_thunk_simple_type(t.to_thunk())
+ TypedThunk::from_value_simple_type(t.to_value())
}),
)
})