diff options
author | Nadrieril | 2019-03-09 15:46:30 +0100 |
---|---|---|
committer | Nadrieril | 2019-03-09 15:46:30 +0100 |
commit | 6037cb224c5e61828ba41cb3d34438ad03a71403 (patch) | |
tree | e3ee6d3a5416d60bf7eaedd7407b931b9063d8bb /dhall_generator | |
parent | a0ac45ccc6bd0168f05626fdf1886560006fcda1 (diff) |
Remove the pervasive Label type parameter
Closes #1
Diffstat (limited to 'dhall_generator')
-rw-r--r-- | dhall_generator/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dhall_generator/src/lib.rs b/dhall_generator/src/lib.rs index f633544..780b621 100644 --- a/dhall_generator/src/lib.rs +++ b/dhall_generator/src/lib.rs @@ -8,7 +8,7 @@ use quote::quote; #[proc_macro] pub fn dhall_expr(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let input_str = input.to_string(); - let expr: Box<Expr<_, X, Import>> = parser::parse_expr(&input_str).unwrap(); + let expr: Box<Expr<X, Import>> = parser::parse_expr(&input_str).unwrap(); let no_import = |_: &Import| -> X { panic!("Don't use import in dhall!()") }; let expr = expr.map_embed(&no_import); @@ -19,7 +19,7 @@ pub fn dhall_expr(input: proc_macro::TokenStream) -> proc_macro::TokenStream { // Returns an expression of type Expr<_, _>. Expects input variables // to be of type Box<Expr<_, _>> (future-proof for structural sharing). fn dhall_to_tokenstream( - expr: &Expr<Label, X, X>, + expr: &Expr<X, X>, ctx: &Context<Label, ()>, ) -> TokenStream { use dhall_core::Expr::*; @@ -75,7 +75,7 @@ fn dhall_to_tokenstream( // Returns an expression of type Box<Expr<_, _>> fn dhall_to_tokenstream_bx( - expr: &Expr<Label, X, X>, + expr: &Expr<X, X>, ctx: &Context<Label, ()>, ) -> TokenStream { use dhall_core::Expr::*; @@ -93,7 +93,7 @@ fn dhall_to_tokenstream_bx( // TODO: insert appropriate shifts ? let v: TokenStream = s.parse().unwrap(); quote! { { - let x: Box<Expr<_, _, _>> = #v.clone(); + let x: Box<Expr<_, _>> = #v.clone(); x } } } |