diff options
author | Nadrieril | 2019-05-07 18:12:04 +0200 |
---|---|---|
committer | Nadrieril | 2019-05-07 18:12:04 +0200 |
commit | 3da450aa3fae23214aa982643b9bc4dd0ea4eaa6 (patch) | |
tree | 02e00cd008d2e7dc899b9211379596fe792f41c8 /dhall_proc_macros | |
parent | d8a3e831fb67f86269c4baa99f9f0798a73a7247 (diff) | |
parent | 14dfeb8e7d2aa87a361a711a485243449426b144 (diff) |
Merge branch 'reorganize'
Diffstat (limited to '')
-rw-r--r-- | dhall_proc_macros/src/derive.rs | 4 | ||||
-rw-r--r-- | dhall_proc_macros/src/quote.rs | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/dhall_proc_macros/src/derive.rs b/dhall_proc_macros/src/derive.rs index 1ccb28b..a5f0925 100644 --- a/dhall_proc_macros/src/derive.rs +++ b/dhall_proc_macros/src/derive.rs @@ -169,9 +169,9 @@ pub fn derive_simple_static_type_inner( for #ident #ty_generics #where_clause { fn get_simple_static_type() -> - ::dhall::expr::SimpleType { + ::dhall::de::SimpleType { #(#assertions)* - ::dhall::expr::SimpleType::from(#get_type) + ::dhall::de::SimpleType::from(#get_type) } } }; diff --git a/dhall_proc_macros/src/quote.rs b/dhall_proc_macros/src/quote.rs index eaf4946..77ed5de 100644 --- a/dhall_proc_macros/src/quote.rs +++ b/dhall_proc_macros/src/quote.rs @@ -7,7 +7,7 @@ use std::collections::BTreeMap; pub fn expr(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input_str = input.to_string(); - let expr: SubExpr<_, Import> = parse_expr(&input_str).unwrap().unnote(); + let expr: SubExpr<_, Import> = parse_expr(&input_str).unwrap(); let no_import = |_: &Import| -> X { panic!("Don't use import in dhall::expr!()") }; let expr = expr.map_embed(no_import); @@ -17,7 +17,7 @@ pub fn expr(input: proc_macro::TokenStream) -> proc_macro::TokenStream { pub fn subexpr(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input_str = input.to_string(); - let expr: SubExpr<_, Import> = parse_expr(&input_str).unwrap().unnote(); + let expr: SubExpr<_, Import> = parse_expr(&input_str).unwrap(); let no_import = |_: &Import| -> X { panic!("Don't use import in dhall::subexpr!()") }; let expr = expr.map_embed(no_import); @@ -94,8 +94,8 @@ where // Returns an expression of type SubExpr<_, _>. Expects interpolated variables // to be of type SubExpr<_, _>. -fn quote_subexpr( - expr: &SubExpr<X, X>, +fn quote_subexpr<N>( + expr: &SubExpr<N, X>, ctx: &Context<Label, ()>, ) -> TokenStream { use dhall_syntax::ExprF::*; @@ -131,7 +131,7 @@ fn quote_subexpr( // Returns an expression of type Expr<_, _>. Expects interpolated variables // to be of type SubExpr<_, _>. -fn quote_expr(expr: &Expr<X, X>, ctx: &Context<Label, ()>) -> TokenStream { +fn quote_expr<N>(expr: &Expr<N, X>, ctx: &Context<Label, ()>) -> TokenStream { use dhall_syntax::ExprF::*; match expr.map_ref_with_special_handling_of_binders( |e| quote_subexpr(e, ctx), |