From: Andre Nathan <andre@digirati.com.br>
To: Francois.Pottier@inria.fr
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] GADTs and Menhir
Date: Tue, 31 Mar 2015 17:41:32 -0300 [thread overview]
Message-ID: <551B067C.2030006@digirati.com.br> (raw)
In-Reply-To: <20150331194531.GA12168@yquem.inria.fr>
[-- Attachment #1: Type: text/plain, Size: 757 bytes --]
On 03/31/2015 04:45 PM, Francois Pottier wrote:
> The problem lies here. What is the OCaml type of the symbol "value"?
I see now.
> 2- perform type-checking (or type inference).
> If you insist on using GADTs, you will probably need
> a GADT of terms (your type 'a Foo.t) and
> a GADT of type representations ('a ty)
> and the type-checking function will have type
> ast -> 'a ty -> 'a Foo.t option
> which means that, given an untyped term and
> a representation of an expected type, it
> either fails or succeeds and produces a typed term.
Can you give me an example of what this "GADT of type representations"
would look like? I couldn't understand the Haskell example...
Thanks,
Andre
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2015-03-31 20:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-31 18:16 Andre Nathan
2015-03-31 19:45 ` Francois Pottier
2015-03-31 20:41 ` Andre Nathan [this message]
2015-04-01 12:16 ` Andre Nathan
2015-04-01 12:27 ` Jeremy Yallop
2015-04-01 12:43 ` Andre Nathan
2015-04-01 13:16 ` Gerd Stolpmann
2015-04-01 18:12 ` Andre Nathan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=551B067C.2030006@digirati.com.br \
--to=andre@digirati.com.br \
--cc=Francois.Pottier@inria.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).