coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: t x <txrev319 AT gmail.com>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] idiom for notation dispatching on type
- Date: Mon, 26 Aug 2013 19:42:58 -0400
You can hack something together using typeclasses. See https://coq.inria.fr/bugs/show_bug.cgi?id=3090, a feature request I made to make the hack unnecessary, for a proof of concept.
-Jason
On Monday, August 26, 2013, t x wrote:
On Monday, August 26, 2013, t x wrote:
So I know that I can define a"START true END => pBool true""START 20 END => pZ 20"In short, I want to create a notation which does _different_ things based on the type of the arguments capture.In particular, I want:
Notation "'STARTZ' x 'ENDZ'" = (pZ x)Notation "'STARTB' x 'ENDB'" = (pBool x)However, I'd prefer to have one definition of "START x END", and have it do different things based on the type. Is this possible in COq?
Thanks!
- [Coq-Club] idiom for notation dispatching on type, t x, 08/27/2013
- Re: [Coq-Club] idiom for notation dispatching on type, Jason Gross, 08/27/2013
Archive powered by MHonArc 2.6.18.