Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Example of functor type

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Example of functor type


chronological Thread 
  • From: Claudio Sacerdoti Coen <sacerdot AT cs.unibo.it>
  • To: Pierre Casteran <pierre.casteran AT labri.fr>
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] Example of functor type
  • Date: Fri, 18 Feb 2005 10:53:17 +0100
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

 Dear Pierre,

> Module F1_2 (M:S1) : S2.

 Wrong, since after the ":" Coq expects the return type.

> Module F1_2 (M:S1) : S2 M.

 Wrong, since module types cannot be applied.
 [ Notice: this limitation could be lifted ]


However, suppose that you already have a functor F1_2 of type S2.
The following works:

Module F1_2' : S2 := F1_2.

(in the CVS version of Coq the following also works:
 Declare Module K : S2.
)

                                        Cheers,
                                        C.S.C.

-- 
----------------------------------------------------------------
Real name: Claudio Sacerdoti Coen
Doctor in Computer Science, University of Bologna
E-mail: 
sacerdot AT cs.unibo.it
http://www.cs.unibo.it/~sacerdot
----------------------------------------------------------------




Archive powered by MhonArc 2.6.16.

Top of Page