Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Definitions inside type class definitions (Coq 8.2beta)

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Definitions inside type class definitions (Coq 8.2beta)


chronological Thread 
  • From: Matthieu Sozeau <Matthieu.Sozeau AT lri.fr>
  • To: Brian Aydemir <baydemir AT cis.upenn.edu>
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] Definitions inside type class definitions (Coq 8.2beta)
  • Date: Mon, 24 Nov 2008 23:10:42 +0100
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Le 24 nov. 08 à 22:46, Brian Aydemir a écrit :

Hi,

Hi,

I have another question about type classes in Coq 8.2beta.  (-:

When defining a record type, I can use "field_name := foo" in order to
explicitly define a field. Since the type class mechanism is built upon
records (or so it seems), can I do the same when defining a type class?

Not yet, in 8.2 you don't even get to parse that.
It is parsed now (in current trunk), as we completely unified parsing of
record/class/(co-)inductive declarations but not supported in
instance declarations (thanks for the accidental bug report :). Of course
the question is, do you get the right to redefine it afterwards à la Haskell.
Currently it works like for records, creating a let-in in the constructor, with
no redefinition allowed.

Cheers,
-- Matthieu




Archive powered by MhonArc 2.6.16.

Top of Page