summaryrefslogtreecommitdiff
path: root/dhall/src/traits/static_type.rs
diff options
context:
space:
mode:
authorNadrieril2019-04-11 13:11:52 +0200
committerNadrieril2019-04-11 13:11:52 +0200
commit82d62c4d7d423817a4fd9d6294d27d18d60bcd22 (patch)
tree887b4af84bc2c69886616a4a9c8aa27fa846238a /dhall/src/traits/static_type.rs
parent9a060908aae564e7155259a4e12d63be3fb97d9b (diff)
Add basic deserialization support
Closes #13
Diffstat (limited to 'dhall/src/traits/static_type.rs')
-rw-r--r--dhall/src/traits/static_type.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/dhall/src/traits/static_type.rs b/dhall/src/traits/static_type.rs
index b402ca9..6c41e3f 100644
--- a/dhall/src/traits/static_type.rs
+++ b/dhall/src/traits/static_type.rs
@@ -47,12 +47,36 @@ impl SimpleStaticType for Natural {
}
}
+impl SimpleStaticType for u32 {
+ fn get_simple_static_type() -> SimpleType {
+ mktype(dhall_expr!(Natural))
+ }
+}
+
+impl SimpleStaticType for u64 {
+ fn get_simple_static_type() -> SimpleType {
+ mktype(dhall_expr!(Natural))
+ }
+}
+
impl SimpleStaticType for Integer {
fn get_simple_static_type() -> SimpleType {
mktype(dhall_expr!(Integer))
}
}
+impl SimpleStaticType for i32 {
+ fn get_simple_static_type() -> SimpleType {
+ mktype(dhall_expr!(Integer))
+ }
+}
+
+impl SimpleStaticType for i64 {
+ fn get_simple_static_type() -> SimpleType {
+ mktype(dhall_expr!(Integer))
+ }
+}
+
impl SimpleStaticType for String {
fn get_simple_static_type() -> SimpleType {
mktype(dhall_expr!(Text))