From 0ec29f6dd0b2927607977151cac5477c0776db9b Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 7 Jul 2018 18:08:21 -0700 Subject: [PATCH] Fix repl --- schala-codegen/Cargo.toml | 1 + schala-codegen/src/lib.rs | 3 +++ schala-repl/src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/schala-codegen/Cargo.toml b/schala-codegen/Cargo.toml index d99cfbb..159368a 100644 --- a/schala-codegen/Cargo.toml +++ b/schala-codegen/Cargo.toml @@ -6,6 +6,7 @@ authors = ["greg "] [dependencies] syn = { version = "0.13.1", features = ["full", "extra-traits"] } quote = "0.5" +schala-repl = { path = "../schala-repl" } [lib] proc-macro = true diff --git a/schala-codegen/src/lib.rs b/schala-codegen/src/lib.rs index 5ed41be..97e12f0 100644 --- a/schala-codegen/src/lib.rs +++ b/schala-codegen/src/lib.rs @@ -4,6 +4,8 @@ extern crate proc_macro; extern crate quote; extern crate syn; +extern crate schala_repl; + use proc_macro::TokenStream; use syn::{Ident, Attribute, DeriveInput}; @@ -54,6 +56,7 @@ pub fn derive_programming_language_interface(input: TokenStream) -> TokenStream let pass_names: Vec = passes.iter().map(|pass| pass.to_string()).collect(); let tokens = quote! { + use schala_repl::PassDescriptor; impl ProgrammingLanguageInterface for #name { fn get_language_name(&self) -> String { #language_name.to_string() diff --git a/schala-repl/src/lib.rs b/schala-repl/src/lib.rs index bc9a7cc..f0932bf 100644 --- a/schala-repl/src/lib.rs +++ b/schala-repl/src/lib.rs @@ -34,7 +34,7 @@ const VERSION_STRING: &'static str = "0.1.0"; include!(concat!(env!("OUT_DIR"), "/static.rs")); pub use language::{LLVMCodeString, ProgrammingLanguageInterface, EvalOptions, - ExecutionMethod, TraceArtifact, FinishedComputation, UnfinishedComputation, PassDebugDescriptor}; + ExecutionMethod, TraceArtifact, FinishedComputation, UnfinishedComputation, PassDebugDescriptor, PassDescriptor}; pub type PLIGenerator = Box Box + Send + Sync>;