coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] How to access "typeclass arguments" in an extraction plugin?
- Date: Tue, 02 Jan 2018 02:10:13 +0000
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jasongross9 AT gmail.com; spf=Pass smtp.mailfrom=jasongross9 AT gmail.com; spf=None smtp.helo=postmaster AT mail-qt0-f170.google.com
- Ironport-phdr: 9a23:jlEuzBVgS3X185qtfAbCJOZMJvfV8LGtZVwlr6E/grcLSJyIuqrYYxCOt8tkgFKBZ4jH8fUM07OQ7/i5HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba9vIBmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KptVRTmijoINyQh/W7YhMx/jqJVrhyiqRJi3YDbfJqYO+Bicq7HZ94WWXZNU8RXWidcAo28dYwPD+8ZMOhctYb9vFwOrR2jDgetHuPvzSRIhmTr1qA90eQuCxrG3AsmH9IBqnTUq871NLwWXO2uw6nIyC/Mb/JS2Tvn9IfIdRUhrOiKULltf8TRzkwvGBnEjlWWsYHlOS2a1+oXvGiB8+pgVPmvhHQhqwFquDSg2sAsiozPi4kIyV7E7T10zJgpKdC8UkJ2Yt6pHIFOuy2HNoZ6WN4uTmN0tCs817YIo4S0fDIQx5Qi3xPfa+KIc4yP4h/7UeaeOzZ4hHZ8dLKmmxa+7VGsyuPhWsS2zFpGtCVFkt7LtnAC0xzc9NKLRed6/kekwTqP1gbT5f9YIU0si6bXN5oszqQzm5cTq0jPADL6lUTsgKOLdEgo5vCk6+H9bbXnop+cOZV0igb7Mqk2mMywG/84Mg8IX2iU4+S806bj/Vb9TbhRgf02l7PWsJHeJcgBuqG5BApV3p456xmjFzemzMgYnX4fIV1ZfxKHlpHlNE3KIPDlFviymE+skTdux/DeJLLtGJTNLn7ZkLfgZ7lx8UBcyBBghexYsplTE/QKJO/5ck73rt3RSBEjYCKuxOOyKtxm0YVWdniIGbTRZKHbqliO6fgoOPLdTIAQsTf5bfMi4qi93jcChVYBcPzxjtMsY3eiE6E+Lg==
As I understand it (and someone please correct me if I'm wrong), this kind of information is not stored in the ast. There is literally no difference between records and records that are typeclasses (and typeclasses can also be definitions, axioms, etc). My current understanding (which may again be wrong) is that there is a separate table somewhere which stores a list of which identifiers are classes.
On Mon, Jan 1, 2018, 3:57 PM John Wiegley <johnw AT newartisans.com> wrote:
Hello,
I'm trying to extend MiniML to remember details about type classes, such as
which arguments used in a call are intended to be type class dictionaries.
Although I realize that Coq and Haskell type classes can yield different
results, this is for a situation where we convert from Haskell to Coq, prove
things about the resulting Coq code, and then extract back to Haskell. So, in
a sense I "know" correct behavior will result from replicating the Haskell
style in the extracted code.
To do this I need to distinguish type classes from records, type class
instances from record values, and type class arguments from plain arguments
(so that they can be elided).
Are there any examples to look at for determining this sort of information
from the Coq AST in OCaml?
Thanks,
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
- [Coq-Club] How to access "typeclass arguments" in an extraction plugin?, John Wiegley, 01/01/2018
- Re: [Coq-Club] How to access "typeclass arguments" in an extraction plugin?, Jason Gross, 01/02/2018
Archive powered by MHonArc 2.6.18.