coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Arnaud Spiwack <Arnaud.Spiwack AT lix.polytechnique.fr>
- To: Andrew McCreight <andrew.mccreight AT yale.edu>
- Cc: coq-club AT pauillac.inria.fr
- Subject: Re: [Coq-Club] integer constant notation
- Date: Tue, 18 Dec 2007 14:22:51 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=J/JmxYfPFqQDQQr8F7mAFXOj+D7DZTfVmblX1Al5GIbkPHrAZgm15o3QZsZfRYsSRu1NeNj29NL9qhuT2hecfJsp+YrMJ6sx9y1mi7g/06ETuoE1yb5IEufU9KGvhkXCxKpHbeIvcD4VQxVay2byqD6undn60a2SrSRqdr0NH+M=
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hi,
There is no such way, unfortunately. It's been wanted for a long time, but no one came up with a convincing design for such a feature.
Currently, all such notations are hacked into the OCaml source of Coq. It's neither satisfying, nor elegant.
You'll have to resort to coercions in your case, I guess.
Arnaud Spiwack
Andrew McCreight a écrit :
Hello,
Is there some way to declare my own custom interpretation of integer constants in a scope, as are available in the nat and Z scopes? If I have a function Z_to_foo : Z -> foo, I'd like to be able to make, for instance, "4" automatically intepreted as "Z_to_foo 4" in a particular context. I looked around on the manual and the nat and Z libraries but couldn't find anything. Coercions sort of do what I want, but it doesn't seem like you can tie them to particular notation scopes. Or is this how nat and Z do it? Thanks!
-Andrew
--------------------------------------------------------
Bug reports: http://logical.futurs.inria.fr/coq-bugs
Archives: http://pauillac.inria.fr/pipermail/coq-club
http://pauillac.inria.fr/bin/wilma/coq-club
Info: http://pauillac.inria.fr/mailman/listinfo/coq-club
- [Coq-Club] I need help with ListSet, Alfonso Nishikawa
- Re: [Coq-Club] I need help with ListSet, Pierre Casteran
- [Coq-Club] integer constant notation,
Andrew McCreight
- Re: [Coq-Club] integer constant notation, Arnaud Spiwack
Archive powered by MhonArc 2.6.16.