mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-08 04:05:43 -05:00
update tests
This commit is contained in:
parent
88eb2575c3
commit
435845d1d4
2 changed files with 26 additions and 0 deletions
|
|
@ -10,3 +10,10 @@ p(b): p b
|
||||||
q(a): q a
|
q(a): q a
|
||||||
q(b): q b
|
q(b): q b
|
||||||
typeof(p a): Bool
|
typeof(p a): Bool
|
||||||
|
pi Bool Bool
|
||||||
|
pi Bool Bool
|
||||||
|
pi Bool (Bool -> Bool)
|
||||||
|
lxy_px: (\x:Bool. (\y:Bool. p x))
|
||||||
|
type: (Bool -> (Bool -> Bool))
|
||||||
|
lxy_px a b: ((\x:Bool. (\y:Bool. p x))) a b
|
||||||
|
type: Bool
|
||||||
|
|
|
||||||
|
|
@ -35,5 +35,24 @@ let () = Fmt.printf "p(b): %a@." pp_debug pb
|
||||||
let () = Fmt.printf "q(a): %a@." pp_debug qa
|
let () = Fmt.printf "q(a): %a@." pp_debug qa
|
||||||
let () = Fmt.printf "q(b): %a@." pp_debug qb
|
let () = Fmt.printf "q(b): %a@." pp_debug qb
|
||||||
let () = assert (equal pa (app store p a))
|
let () = assert (equal pa (app store p a))
|
||||||
|
|
||||||
|
(* *)
|
||||||
|
|
||||||
let ty_pa = ty_exn pa
|
let ty_pa = ty_exn pa
|
||||||
let () = Fmt.printf "typeof(p a): %a@." pp_debug ty_pa
|
let () = Fmt.printf "typeof(p a): %a@." pp_debug ty_pa
|
||||||
|
|
||||||
|
(* *)
|
||||||
|
|
||||||
|
let v_x = Var.make "x" bool
|
||||||
|
let v_y = Var.make "y" bool
|
||||||
|
let x = var store v_x
|
||||||
|
let y = var store v_y
|
||||||
|
let lxy_px = lam store v_x @@ lam store v_y @@ app store p x
|
||||||
|
|
||||||
|
let () =
|
||||||
|
Fmt.printf "@[<v2>lxy_px: %a@ type: %a@]@." pp_debug lxy_px pp_debug
|
||||||
|
(ty_exn lxy_px)
|
||||||
|
|
||||||
|
let () =
|
||||||
|
let t = app_l store lxy_px [ a; b ] in
|
||||||
|
Fmt.printf "@[<v2>lxy_px a b: %a@ type: %a@]@." pp_debug t pp_debug (ty_exn t)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue