update tests

This commit is contained in:
Simon Cruanes 2022-07-27 22:45:10 -04:00
parent 88eb2575c3
commit 435845d1d4
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 26 additions and 0 deletions

View file

@ -10,3 +10,10 @@ p(b): p b
q(a): q a
q(b): q b
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

View file

@ -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(b): %a@." pp_debug qb
let () = assert (equal pa (app store p a))
(* *)
let ty_pa = ty_exn 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)