diff options
Diffstat (limited to 'dhall_generator')
-rw-r--r-- | dhall_generator/src/dhall_type.rs | 10 | ||||
-rw-r--r-- | dhall_generator/src/lib.rs | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/dhall_generator/src/dhall_type.rs b/dhall_generator/src/dhall_type.rs index 3b1d1c9..38c871d 100644 --- a/dhall_generator/src/dhall_type.rs +++ b/dhall_generator/src/dhall_type.rs @@ -44,7 +44,7 @@ pub fn derive_for_struct( .map(|(name, ty)| { let name = dhall_core::Label::from(name); constraints.push(ty.clone()); - (name, quote!(<#ty as dhall::Type>::get_type())) + (name, quote!(<#ty as dhall::StaticType>::get_type())) }) .collect(); let record = @@ -88,7 +88,7 @@ pub fn derive_for_enum( }; let ty = ty?; constraints.push(ty.clone()); - Ok((name, quote!(<#ty as dhall::Type>::get_type()))) + Ok((name, quote!(<#ty as dhall::StaticType>::get_type()))) }) .collect::<Result<_, Error>>()?; @@ -136,7 +136,7 @@ pub fn derive_type_inner( let mut local_where_clause = orig_where_clause.clone(); local_where_clause .predicates - .push(parse_quote!(#ty: dhall::Type)); + .push(parse_quote!(#ty: dhall::StaticType)); let phantoms = generics.params.iter().map(|param| match param { syn::GenericParam::Type(syn::TypeParam { ident, .. }) => { quote!(#ident) @@ -156,12 +156,12 @@ pub fn derive_type_inner( // Ensure that all the fields have a Type impl let mut where_clause = orig_where_clause.clone(); for ty in constraints.iter() { - where_clause.predicates.push(parse_quote!(#ty: dhall::Type)); + where_clause.predicates.push(parse_quote!(#ty: dhall::StaticType)); } let ident = &input.ident; let tokens = quote! { - impl #impl_generics dhall::Type for #ident #ty_generics + impl #impl_generics dhall::StaticType for #ident #ty_generics #where_clause { fn get_type() -> dhall_core::DhallExpr { #(#assertions)* diff --git a/dhall_generator/src/lib.rs b/dhall_generator/src/lib.rs index f31faa4..08ce21e 100644 --- a/dhall_generator/src/lib.rs +++ b/dhall_generator/src/lib.rs @@ -21,7 +21,7 @@ pub fn subexpr(input: TokenStream) -> TokenStream { dhall_expr::subexpr(input) } -#[proc_macro_derive(Type)] +#[proc_macro_derive(StaticType)] pub fn derive_type(input: TokenStream) -> TokenStream { dhall_type::derive_type(input) } |