wilbowma/cur

motive arg for `new-elim` (and `elim`) doesnt do anything?

Closed this issue · 2 comments

Should the following program produce a type error, because the body of the motive doesnt match the branches? It actually doesnt seem to matter what I use as the motive at all. (elim also has the same behavior.)

#lang cur
(data Nat2 : 0 (Type 0)
      (zz : Nat2)
      (ss : (Π (n : Nat2) Nat2)))
(data Nat3 : 0 (Type 0)
      (zzz : Nat3)
      (sss : (Π (n : Nat3) Nat3)))

;; convert Nat2 to Nat3
(new-elim (ss (ss zz))
          (λ (x : Nat2) Nat2)
          zzz
           (λ (n : Nat2) (λ (IH : Nat3) (sss IH))))
; => (sss (sss (zzz)))