mirror of
https://github.com/HigherOrderCO/Kind1.git
synced 2024-09-11 08:45:32 +03:00
fix: changed to tids=1 in the type checker because snooze is causing some problems in HVM
This commit is contained in:
parent
297752fb0a
commit
a92495f6f0
4
.github/workflows/cargo.yml
vendored
4
.github/workflows/cargo.yml
vendored
@ -7,7 +7,7 @@ jobs:
|
|||||||
cargo_check:
|
cargo_check:
|
||||||
name: 👁️🗨️ Cargo Check
|
name: 👁️🗨️ Cargo Check
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
timeout-minutes: 5
|
timeout-minutes: 10
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, ubuntu-latest]
|
os: [macos-latest, ubuntu-latest]
|
||||||
@ -26,7 +26,7 @@ jobs:
|
|||||||
cargo_test:
|
cargo_test:
|
||||||
name: 🧪 Cargo Test
|
name: 🧪 Cargo Test
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
timeout-minutes: 5
|
timeout-minutes: 10
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, ubuntu-latest]
|
os: [macos-latest, ubuntu-latest]
|
||||||
|
@ -18,13 +18,15 @@ use report::parse_report;
|
|||||||
pub const CHECKER: &str = include_str!("checker.hvm");
|
pub const CHECKER: &str = include_str!("checker.hvm");
|
||||||
|
|
||||||
pub fn eval(file: &str, term: &str, dbug: bool, tids: Option<usize>) -> Result<Box<Term>, String> {
|
pub fn eval(file: &str, term: &str, dbug: bool, tids: Option<usize>) -> Result<Box<Term>, String> {
|
||||||
|
|
||||||
let file = language::syntax::read_file(&format!("{}\nHVM_MAIN_CALL = {}", file, term))?;
|
let file = language::syntax::read_file(&format!("{}\nHVM_MAIN_CALL = {}", file, term))?;
|
||||||
|
|
||||||
let book = language::rulebook::gen_rulebook(&file);
|
let book = language::rulebook::gen_rulebook(&file);
|
||||||
let mut prog = runtime::Program::new();
|
let mut prog = runtime::Program::new();
|
||||||
prog.add_book(&book);
|
prog.add_book(&book);
|
||||||
let size = runtime::default_heap_size();
|
let size = runtime::default_heap_size();
|
||||||
|
|
||||||
let tids = tids.unwrap_or_else(runtime::default_heap_tids);
|
let tids = tids.unwrap_or(1);
|
||||||
|
|
||||||
let heap = runtime::new_heap(size, tids);
|
let heap = runtime::new_heap(size, tids);
|
||||||
let tids = runtime::new_tids(tids);
|
let tids = runtime::new_tids(tids);
|
||||||
@ -83,6 +85,7 @@ pub fn type_check(
|
|||||||
/// we run the "eval_main" that runs the generated version that both HVM and
|
/// we run the "eval_main" that runs the generated version that both HVM and
|
||||||
/// and the checker can understand.
|
/// and the checker can understand.
|
||||||
pub fn eval_api(book: &Book) -> Box<Term> {
|
pub fn eval_api(book: &Book) -> Box<Term> {
|
||||||
|
|
||||||
let file = gen_checker(book, Vec::new());
|
let file = gen_checker(book, Vec::new());
|
||||||
|
|
||||||
let file = language::syntax::read_file(&file).unwrap();
|
let file = language::syntax::read_file(&file).unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user