Skip to Content.
Sympa Menu

coq-club - [Coq-Club]Unexpected behavour of Opaque

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club]Unexpected behavour of Opaque


chronological Thread 
  • From: roconnor AT theorem.ca
  • To: Coq Club <coq-club AT pauillac.inria.fr>
  • Subject: [Coq-Club]Unexpected behavour of Opaque
  • Date: Fri, 17 Mar 2006 10:41:27 -0500 (EST)
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Why is it that when you declare something as Opaque in a module, it become
transparent when the module is imported.  For example

(* File: foo.v *)
Definition X := nat.

Lemma foo1 : X -> nat.
unfold X.
tauto.
Qed.

Opaque X.

Lemma foo2 : X -> nat.
(* unfold X. doesn't work *)
apply foo1.
Qed.

But now when foo.v is imported

(* File: bar.v *)

Require Export foo.

Lemma bar1 : X -> nat.
unfold X. (* Now works *)
tauto.
Qed.

-- 
Russell O'Connor                                      <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''





Archive powered by MhonArc 2.6.16.

Top of Page