From 0424d165836fcbf15aa2e05527d0e790941c9518 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 24 Mar 2019 23:36:15 +0100 Subject: Lay groundwork for DhallType deriving --- dhall_core/src/dhall_type.rs | 10 ++++++++++ dhall_core/src/lib.rs | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 dhall_core/src/dhall_type.rs (limited to 'dhall_core') diff --git a/dhall_core/src/dhall_type.rs b/dhall_core/src/dhall_type.rs new file mode 100644 index 0000000..3635e67 --- /dev/null +++ b/dhall_core/src/dhall_type.rs @@ -0,0 +1,10 @@ +use crate::*; + +#[derive(Debug, Clone)] +pub enum DhallConversionError {} + +pub trait DhallType: Sized { + fn dhall_type() -> DhallExpr; + // fn as_dhall(&self) -> DhallExpr; + // fn from_dhall(e: DhallExpr) -> Result; +} diff --git a/dhall_core/src/lib.rs b/dhall_core/src/lib.rs index 0874b09..b15c644 100644 --- a/dhall_core/src/lib.rs +++ b/dhall_core/src/lib.rs @@ -18,4 +18,6 @@ mod printer; pub use crate::printer::*; mod parser; pub use crate::parser::*; +mod dhall_type; +pub use dhall_type::*; pub mod context; -- cgit v1.2.3