coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Rui Baptista <rpgcbaptista AT gmail.com>
- To: t x <txrev319 AT gmail.com>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Why does this code stack overflow?
- Date: Wed, 21 Aug 2013 12:19:01 +0100
I think it's a type inference bug. I've reported a similar bug before. Try this instead:
Fixpoint dict_get (lst: dict K V) (k: K) {struct lst} : in_list k (keys lst) -> V.
refine(
match lst with
| nil => fun H => False_rect _ (lem__in_list_nil _ H)
| x :: xs => _
end).
Fixpoint dict_get (lst: dict K V) (k: K) {struct lst} : in_list k (keys lst) -> V.
refine(
match lst with
| nil => fun H => False_rect _ (lem__in_list_nil _ H)
| x :: xs => _
end).
On Wed, Aug 21, 2013 at 12:02 AM, t x <txrev319 AT gmail.com> wrote:
What am I doing wrong?| nil => fun H => _I'm trying to understand how to change functions from ": option X" to ": X" by passing along proofs.I get a stack overflow when I try to process lines 45-49. (Weirdly enough, if I change line 47 to:
However, in this example:
https://gist.github.com/anonymous/9f56cd467bc2e80c7d9c#file-test-v-L45
then everything goes through fine.
- [Coq-Club] Why does this code stack overflow?, t x, 08/21/2013
- Re: [Coq-Club] Why does this code stack overflow?, Rui Baptista, 08/21/2013
Archive powered by MHonArc 2.6.18.