From 93d0cfe5b82280540e2ffea3d3c9f4d43eff3cc9 Mon Sep 17 00:00:00 2001 From: greg Date: Thu, 2 Nov 2017 02:45:26 -0700 Subject: [PATCH] Make schala-lib::language private and reexport --- schala-lib/src/lib.rs | 4 ++-- src/maaru_lang/compilation.rs | 2 +- src/maaru_lang/mod.rs | 2 +- src/main.rs | 1 - src/robo_lang/mod.rs | 3 +-- src/schala_lang/mod.rs | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/schala-lib/src/lib.rs b/schala-lib/src/lib.rs index 21a5b55..2ec384c 100644 --- a/schala-lib/src/lib.rs +++ b/schala-lib/src/lib.rs @@ -23,13 +23,13 @@ use std::io::{Read, Write}; use std::process::exit; use std::default::Default; -pub mod language; -use language::{ProgrammingLanguageInterface, EvalOptions, LLVMCodeString}; +mod language; mod webapp; pub mod llvm_wrap; include!(concat!(env!("OUT_DIR"), "/static.rs")); +pub use language::{ProgrammingLanguageInterface, EvalOptions, ReplOutput, TraceArtifact, LLVMCodeString}; pub type PLIGenerator = Box Box + Send + Sync>; pub fn schala_main(generators: Vec) { diff --git a/src/maaru_lang/compilation.rs b/src/maaru_lang/compilation.rs index 75d2bf8..d8f1254 100644 --- a/src/maaru_lang/compilation.rs +++ b/src/maaru_lang/compilation.rs @@ -6,7 +6,7 @@ use self::llvm_sys::prelude::*; use self::llvm_sys::{LLVMIntPredicate}; use maaru_lang::parser::{AST, Statement, Function, Prototype, Expression, BinOp}; -use schala_lib::language::LLVMCodeString; +use schala_lib::LLVMCodeString; use schala_lib::llvm_wrap as LLVMWrap; diff --git a/src/maaru_lang/mod.rs b/src/maaru_lang/mod.rs index 6ecc3d9..1affe00 100644 --- a/src/maaru_lang/mod.rs +++ b/src/maaru_lang/mod.rs @@ -3,7 +3,7 @@ pub mod parser; pub mod eval; pub mod compilation; -use schala_lib::language::{ProgrammingLanguageInterface, EvalOptions, ReplOutput, TraceArtifact, LLVMCodeString}; +use schala_lib::{ProgrammingLanguageInterface, EvalOptions, ReplOutput, TraceArtifact, LLVMCodeString}; #[derive(Debug)] pub struct TokenError { diff --git a/src/main.rs b/src/main.rs index 798fdfd..f4a4ca6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,6 @@ mod robo_lang; extern crate schala_lib; use schala_lib::{PLIGenerator, schala_main}; -use schala_lib::language::ProgrammingLanguageInterface; #[link_args="-ltinfo"] extern { } diff --git a/src/robo_lang/mod.rs b/src/robo_lang/mod.rs index 931bcf9..d37404c 100644 --- a/src/robo_lang/mod.rs +++ b/src/robo_lang/mod.rs @@ -1,6 +1,5 @@ use itertools::Itertools; - -use schala_lib::language::{ProgrammingLanguageInterface, EvalOptions, ReplOutput}; +use schala_lib::{ProgrammingLanguageInterface, EvalOptions, ReplOutput}; pub struct Robo { } diff --git a/src/schala_lang/mod.rs b/src/schala_lang/mod.rs index 0c61a20..2061a4f 100644 --- a/src/schala_lang/mod.rs +++ b/src/schala_lang/mod.rs @@ -1,5 +1,5 @@ use itertools::Itertools; -use schala_lib::language::{ProgrammingLanguageInterface, EvalOptions, TraceArtifact, ReplOutput}; +use schala_lib::{ProgrammingLanguageInterface, EvalOptions, TraceArtifact, ReplOutput}; mod parsing; mod type_check;