mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
eta in test
This commit is contained in:
parent
19252991a5
commit
eeddb0b25a
4 changed files with 6 additions and 6 deletions
|
|
@ -542,7 +542,7 @@ let compile cmd env imports code =
|
||||||
| FAIL ((line, col), value) ->
|
| FAIL ((line, col), value) ->
|
||||||
let v, env = if value then env#peek, env else env#pop in
|
let v, env = if value then env#peek, env else env#pop in
|
||||||
let s, env = env#string cmd#get_infile in
|
let s, env = env#string cmd#get_infile in
|
||||||
env, [Push (L (box col)); Push (L (box line)); Push (M ("$" ^ s)); Push v; Call "Bmatch_failure"; Binop ("+", L (3 * word_size), esp)]
|
env, [Push (L (box col)); Push (L (box line)); Push (M ("$" ^ s)); Push v; Call "Bmatch_failure"; Binop ("+", L (4 * word_size), esp)]
|
||||||
|
|
||||||
| i ->
|
| i ->
|
||||||
invalid_arg (Printf.sprintf "invalid SM insn: %s\n" (GT.show(insn) i))
|
invalid_arg (Printf.sprintf "invalid SM insn: %s\n" (GT.show(insn) i))
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
let version = "Version 1.00, 53b2efc3b, Fri Dec 11 01:22:25 2020 +0300"
|
let version = "Version 1.00, 19252991a, Thu Dec 24 02:54:54 2020 +0300"
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ public fun id (x) {
|
||||||
x
|
x
|
||||||
}
|
}
|
||||||
|
|
||||||
public infixl $ after := (f, x) {
|
public infixr $ after := (f, x) {
|
||||||
f (x)
|
f (x)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ import Fun;
|
||||||
|
|
||||||
fun many (a) {
|
fun many (a) {
|
||||||
memo (
|
memo (
|
||||||
fun (k) {
|
eta (
|
||||||
empty @ lift({})
|
empty @ lift({})
|
||||||
| many (a) |> fun (as) {a @ fun (x) {as +++ singleton (x)}} $ k
|
| many (a) |> fun (as) {a @ fun (x) {as +++ singleton (x)}}
|
||||||
}
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue