Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] allowed types in imperative programs

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] allowed types in imperative programs


chronological Thread 
  • From: ""Savi Maharaj"" <savi AT cs.stir.ac.uk>
  • To: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] allowed types in imperative programs
  • Date: Mon, 26 Aug 2002 12:38:29 +0100 (BST)
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Dear Jean-Christophe,

Thanks for your reply. Unfortunately, I am still having trouble
getting Coq to accept my syntax. My impression is that there is some
problem with the use of implicit arguments within program expressions,
but maybe it is just that I haven't found the right syntax. I'll show
you a simple example of what I'm typing in and perhaps you can spot
what's wrong.

Here's the context:
  Require Correctness.
  Require PolyList.
  Global Variable l : (list nat) ref.

Then I try:

   Correctness silly_example l := (tail !l).

This gives me 
   Error: Illegal application (Type Error):
   The term tail of type (A:Set)(list A)->(list A)
   cannot be applied to the term
    l : (list nat)::Set
   This term has type (list nat)::Set which should be coercible to Set

I have tried adding the implicit argument (1!nat) but this seems to get
interpreted as an (unbound) reference. For example, if I type:

   Correctness silly_example l := (((tail) (1!nat)) !l).

I get the message:

   Error: Unbound reference nat

I have tried other combinations of parentheses but nothing works.

Savi
 







Archive powered by MhonArc 2.6.16.

Top of Page