coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- 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
- [Coq-Club] Seemingly identical type with type error, S3, 11/18/2012
- Re: [Coq-Club] Seemingly identical type with type error, Hugo Herbelin, 11/18/2012
- Re: [Coq-Club] Seemingly identical type with type error, S3, 11/18/2012
- Re: [Coq-Club] Seemingly identical type with type error, Hugo Herbelin, 11/18/2012
- Re: [Coq-Club] Seemingly identical type with type error, S3, 11/18/2012
- Re: [Coq-Club] Seemingly identical type with type error, Hugo Herbelin, 11/18/2012
Archive powered by MHonArc 2.6.18.