Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Specifying fields of a base class?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Specifying fields of a base class?


chronological Thread 
  • From: Victor Porton <porton AT narod.ru>
  • To: Coq <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Specifying fields of a base class?
  • Date: Tue, 15 Nov 2011 02:50:23 +0400
  • Envelope-from: porton AT yandex.ru

Oh, I found a solution myself:

Instance sample: Derived := {
  link:={|n:=0|}
}.
trivial.

But I think, it would be better (for a future version of Coq) if my naive 
solution (see below) also worked.

15.11.2011, 00:33, "Victor Porton" 
<porton AT narod.ru>:
> This does not compile. First: is it a feature or a misfeature? Second: How 
> to write what I intended in Coq 8.3pl2?
>
> [[[[
> Class Base := {
> ššn: nat
> }.
>
> Class Derived := {
> ššlink :> Base
> }.
>
> Instance sample: Derived := {
> ššn := 0
> }.
> ]]]]
>
> --
> Victor Porton - http://portonvictor.org

-- 
Victor Porton - http://portonvictor.org



Archive powered by MhonArc 2.6.16.

Top of Page