coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Elie Soubiran <soubiran AT lix.polytechnique.fr>
- To: "M. Scott Doerrie" <mdoerri AT cs.jhu.edu>
- Cc: coq-club AT pauillac.inria.fr
- Subject: Re: [Coq-Club] Leveraging the module system
- Date: Sat, 31 Jan 2009 10:12:42 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=vpxSZVh2AsUPSPYCQ3dA84rnEgxEu/25tc+grCdBpIob+j9yGFdGbRIGwMYQSClsEZ SDoE73VBAuxEq81/kLGcrp7L7Z+/y4a8lA9zAtkJhO0O+0RN2NIoM7JLYaz0Qyw960r/ 2BiS3ko7jOGaYJed0MXv39XDLA6e0dW3ytwHM=
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hello,
If you are using coq 8.1 you should do as follow:
Module Type SIG.
Parameter t : T.
Parameter foo : t -> Prop.
End SIG.
Module F (X:SIG2) : SIG with Definition t := X.t.
Definition t : T := P.t.
Definition foo : t -> Prop := ...
End F.
Or if you are using 8.2 or trunk you can keep your type SIG but use it
like this:
Module F (X:SIG2) : SIG X.
....
Elie
On Fri, Jan 30, 2009 at 10:15 PM, M. Scott Doerrie
<mdoerri AT cs.jhu.edu>
wrote:
> I have defined a ModuleType functor and a Module functor somewhat as
> follows.
>
> For discussion assume SIG2 is a Module Type.
>
> Module Type SIG (P: SIG2).
>
> Parameter foo : P.t -> Prop.
>
> End SIG.
>
>
> Module Impl (P:SIG2).
>
> Definition foo (P:t) : Prop := (* implementation *).
>
> End Impl
>
>
> I can't determine how to declare that Impl is of type SIG? Use of <: and :
> operators produce syntactic error messages. I'm sure this is a simple
> example, but I am confused by what I thought was straightforward to express.
>
> Scott Doerrie
>
> --------------------------------------------------------
> Bug reports: http://logical.futurs.inria.fr/coq-bugs
> Archives: http://pauillac.inria.fr/pipermail/coq-club
> http://pauillac.inria.fr/bin/wilma/coq-club
> Info: http://pauillac.inria.fr/mailman/listinfo/coq-club
>
- [Coq-Club] Leveraging the module system, M. Scott Doerrie
- Re: [Coq-Club] Leveraging the module system,
Taral
- Re: [Coq-Club] Leveraging the module system, M. Scott Doerrie
- Re: [Coq-Club] Leveraging the module system, Elie Soubiran
- Re: [Coq-Club] Leveraging the module system, M. Scott Doerrie
- Re: [Coq-Club] Leveraging the module system, M. Scott Doerrie
- Re: [Coq-Club] Leveraging the module system,
Taral
Archive powered by MhonArc 2.6.16.