mirror of
https://github.com/Kindelia/Kind2.git
synced 2024-09-11 07:15:45 +03:00
all old Lit.Lang test code are running
This commit is contained in:
parent
6591d61db9
commit
731a2688be
@ -504,9 +504,10 @@ Lit.Core.World.run.statement(
|
||||
}
|
||||
call:
|
||||
let exec = statement.expr
|
||||
// This assumes that the type Unit is already defined to avoid
|
||||
// This assumes that the call returns the built-in type Word to avoid
|
||||
// duplicating the typechecking function.
|
||||
let term_ok = Lit.Core.World.check.term(exec, Lit.Core.Type.word, {}, world, none)
|
||||
let call_type = Lit.Core.Type.word
|
||||
let term_ok = Lit.Core.World.check.term(exec, call_type, {}, world, none)
|
||||
if term_ok then
|
||||
let {result, world} = Lit.Core.World.run.term(exec, world, {})
|
||||
log("- ext_exec: " | Lit.Lang.show.term(result, world))
|
||||
@ -684,7 +685,12 @@ Lit.Core: _
|
||||
|
||||
case Lit.Core.World.run.page(page, world) as result {
|
||||
none:
|
||||
IO.print("failure")
|
||||
IO.print("FAILURE")
|
||||
some:
|
||||
IO.print("success")
|
||||
IO {
|
||||
// log("page:")
|
||||
// let new_world = result.value
|
||||
// log(Lit.Lang.show.page(page, new_world))
|
||||
IO.print("SUCCESS")
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ Count.inc(): Unit
|
||||
do {
|
||||
call ret = Bits.add(Bits/i{pred:Bits/i{pred: Bits/e}}, Bits/i{pred: Bits/e})
|
||||
call dupped = Bits.dup(ret)
|
||||
Unit/new
|
||||
}: Unit
|
||||
0
|
||||
}
|
||||
|
||||
`
|
||||
|
Loading…
Reference in New Issue
Block a user