coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "Brian E. Aydemir" <baydemir AT cis.upenn.edu>
- To: Guillaume Melquiond <guillaume.melquiond AT ens-lyon.fr>
- Cc: coq-club AT pauillac.inria.fr
- Subject: Re: [Coq-Club] Modules and visibility
- Date: Thu, 3 May 2007 08:47:56 -0400
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
On May 3, 2007, at 5:03 AM, Guillaume Melquiond wrote:
Module Type A.
Parameter T : Type.
Parameter f : T -> T.
End A.
Module B : A.
Definition T := nat.
Definition g := S.
Definition f := fun x : T => x.
End B.
Import B.
Print T.
Check (f 0).
I believe that if you change the declaration of Module B to be
Module B : A with Definition T := nat.
you will get the behavior that you are looking for.
(* **** *)
Coq < Print T.
T = nat
: Type
Coq < Print g.
User error: g not a defined object
Coq < Check (f 0).
f 0
: T
(* **** *)
There is a similar example in Section 2.5.7 of the reference manual.
Hope that helps,
Brian
- [Coq-Club] Modules and visibility, Guillaume Melquiond
- Re: [Coq-Club] Modules and visibility, Andrew McCreight
- Re: [Coq-Club] Modules and visibility, Brian E. Aydemir
- Re: [Coq-Club] Modules and visibility, Guillaume Melquiond
Archive powered by MhonArc 2.6.16.