coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Matthieu Sozeau <matthieu.sozeau AT gmail.com>
- To: Jason Gross <jasongross9 AT gmail.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Getting [where] notation to work in [Record]s
- Date: Sat, 28 Jul 2012 18:40:56 +0200
Hi Jason,
you have to declare it before Foo is parsed:
Record foo := {
Obj : Type;
Times : Obj -> Obj -> Type where "A * B" := (Times A B) : type_scope;
Foo : forall A B : Obj, A * B
}.
-- Matthieu
Le 28 juil. 2012 à 15:22, Jason Gross a écrit :
> Hi,
> I'm trying to get [where] notation working in [Record]s. If I do
> Record foo := {
> Obj : Type;
> Times : Obj -> Obj -> Type;
> Foo : forall A B : Obj, A * B where "A * B" := (Times A B)
> }.
> or
> Record foo := {
> Obj : Type;
> Times : Obj -> Obj -> Type;
> Foo : forall A B : Obj, A * B where "A * B" := (Times A B) : type_scope
> }.
> Coq tells me "The term "A" has type "Obj" while it is expected to have type
> "Type"."
>
> If I do
> Reserved Notation "A *** B" (at level 70, B at next level, right
> associativity).
> Record foo := {
> Obj : Type;
> Times : Obj -> Obj -> Type;
> Foo : forall A B : Obj, A *** B where "A *** B" := (Times A B)
> }.
> then Coq tells me "Error: Unknown interpretation for notation "_ *** _"."
>
> How can I get this working the way I want to?
>
> Thanks.
>
> -Jason
- [Coq-Club] Getting [where] notation to work in [Record]s, Jason Gross, 07/28/2012
- Re: [Coq-Club] Getting [where] notation to work in [Record]s, Matthieu Sozeau, 07/28/2012
Archive powered by MHonArc 2.6.18.