caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: "Soegtrop, Michael" <michael.soegtrop@intel.com>
Cc: Jonas Jensen <jj@issuu.com>, "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Newbie comment on constructor syntax
Date: Fri, 6 Nov 2015 13:54:33 +0100	[thread overview]
Message-ID: <CAPFanBHKAv0rsBab7c3i7LrEPgCMzAj3b_CQm1tjZo0rmLN1Qg@mail.gmail.com> (raw)
In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3E11A@IRSMSX102.ger.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1734 bytes --]

The implementation technique used by Jun Furuse is to duplicate the
implementation of the type-checker, and change only the parts that
type-check constructor applications. This is the least-constraining way to
write type-aware transformations as ppx extensions. A more concise way is
to call compiler-libs for type-checking and postprocess the resulting typed
AST, but this is only reasonable if the input source is expected to be
well-typed.

(There are few limit on the kind of transformations you can do if you are,
in fact, willing to fork the compiler codebase if necessary. But, as Jonas
Jensen mentioned, this is "adventurous" indeed.)

On Fri, Nov 6, 2015 at 1:46 PM, Soegtrop, Michael <
michael.soegtrop@intel.com> wrote:

> Dear Jonas,
>
> thanks for the link! It is interesting that others feel enough pain to
> write 200k of code to get a nicer and more flexible constructor syntax.
> Also interesting that it takes > 200k of code to do this even with ppx. And
> I am not sure if this would works for matches - at least there are none in
> the test files. For sure I need to gather a bit more experience before I
> dig into this.
>
> Best regards,
>
> Michael
> Intel Deutschland GmbH
> Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
> Tel: +49 89 99 8853-0, www.intel.de
> Managing Directors: Christin Eisenschmid, Christian Lamprechter
> Chairperson of the Supervisory Board: Nicole Lau
> Registered Office: Munich
> Commercial Register: Amtsgericht Muenchen HRB 186928
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

[-- Attachment #2: Type: text/html, Size: 2574 bytes --]

  reply	other threads:[~2015-11-06 12:55 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06  9:33 Soegtrop, Michael
2015-11-06 10:04 ` Nicolas Ojeda Bar
2015-11-06 10:31 ` Francois Berenger
2015-11-06 12:20   ` Soegtrop, Michael
2015-11-06 12:34     ` Gabriel Scherer
2015-11-06 13:09       ` Soegtrop, Michael
2015-11-06 14:10         ` Ashish Agarwal
2015-11-06 15:19           ` Soegtrop, Michael
2015-11-06 15:21             ` Ashish Agarwal
2015-11-21 17:24       ` [Caml-list] Notation for currying Hendrik Boom
2015-11-21 17:41         ` Gabriel Scherer
2015-11-21 18:05         ` David Rajchenbach-Teller
2015-11-21 18:55           ` Gabriel Scherer
2015-11-06 12:29 ` [Caml-list] Newbie comment on constructor syntax Jonas Jensen
2015-11-06 12:46   ` Soegtrop, Michael
2015-11-06 12:54     ` Gabriel Scherer [this message]
2015-11-08 21:16 ` Florian Weimer
2015-11-08 22:50   ` Norman Hardy
2015-11-09  6:27     ` Florian Weimer
2015-11-09 13:27       ` Stefan Monnier
2015-11-09  8:09     ` Soegtrop, Michael
2015-11-09 10:00       ` Hendrik Boom
2015-11-09 10:16       ` Alain Frisch
2015-11-09 10:35         ` Andreas Rossberg
2015-11-09 12:28           ` Alain Frisch
2015-11-09 17:33           ` Alain Frisch
2015-11-09 18:08             ` Gabriel Scherer
2015-11-09 18:16               ` Andreas Rossberg
2015-11-09 21:11                 ` Gabriel Scherer
2015-11-09 22:06                   ` Alain Frisch
2015-11-09 22:27                   ` Andreas Rossberg
2015-11-09 22:57                     ` Jeremy Yallop
2015-11-10  0:11                   ` Hendrik Boom
2015-11-10  8:27                   ` Soegtrop, Michael
2015-11-10 10:25                     ` Romain Bardou
2015-11-10 10:44                       ` Alain Frisch
2015-11-10 10:55                         ` Romain Bardou
2015-11-10 13:17                           ` Alain Frisch
2015-11-10 13:41                             ` Romain Bardou
2015-11-10 14:01                               ` Alain Frisch
2015-11-13 15:36                           ` Romain Bardou
2015-11-10 11:17                         ` Soegtrop, Michael
2015-11-10 14:11                     ` Hendrik Boom
2015-11-10 14:40                       ` immanuel litzroth
2015-11-10 15:30                       ` Soegtrop, Michael
2015-11-10 17:27                         ` Gerd Stolpmann
2015-11-09 20:32               ` Alain Frisch

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=CAPFanBHKAv0rsBab7c3i7LrEPgCMzAj3b_CQm1tjZo0rmLN1Qg@mail.gmail.com \
    --to=gabriel.scherer@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=jj@issuu.com \
    --cc=michael.soegtrop@intel.com \
    /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).