Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Seemingly identical type with type error

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Seemingly identical type with type error


Chronological Thread 
  • From: Hugo Herbelin <Hugo.Herbelin AT inria.fr>
  • To: S3 <scubed2 AT gmail.com>
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Seemingly identical type with type error
  • Date: Sun, 18 Nov 2012 04:01:55 +0100

> > Inference of "i" in poly_in seems to work for me in (at least) 8.3pl2.
>
> I meant that while I can do
>
> Compute poly_in 0 tt.
> = 0
>
> I can't do
>
> Compute poly_in _ tt.
> ^^
> Error: The term "tt" has type "unit" while it is expected to have type
> "match ?22 with
> | 0 => unit
> | S _ => nat
> end".

Indeed, equations of the form "match ? with ... end = something", even
the ones with a simple unique solution as in your case, are not (yet)
treated by the type inference algorithm of Coq. Note that if you had
written "poly_in _ 0", then, there would have been countably many
solutions though!

Hugo Herbelin



Archive powered by MHonArc 2.6.18.

Top of Page