caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Wojciech Meyer <wojciech.meyer@googlemail.com>
To: Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
Cc: Andrej Bauer <andrej.bauer@andrej.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Agda-style parser
Date: Fri, 6 Jul 2012 14:23:39 +0100	[thread overview]
Message-ID: <CAOg1smBbsULE5--cgKaCciJYCMi5Z8v4eRYZeN2quassM79SSQ@mail.gmail.com> (raw)
In-Reply-To: <CAHvkLrOX1FyiHbwbWSwi44H6RPV--vWOdMXdynQ_DUSb3YkW9w@mail.gmail.com>

Hi,

I think his talking about "mix-fix" notation.

Basically the underscores are placeholders for expression in "mix-fix"
operator that can be subsitutied by any expression:

if _ then _ else _ = fun cond yes no -> if cond then yes else no

please note that under strict evaulation like in OCaml it will not be correct.

Another example:

_ ++ _ = List.append

In Coq there is support for mix-fix operators via. Notation.

Wojciech


On Fri, Jul 6, 2012 at 2:17 PM, Fabrice Le Fessant
<Fabrice.Le_fessant@inria.fr> wrote:
> Could you give more details about what you are looking for, for those
> ones who are not familiar with Agda "cool underscore thingy" ?
>
> Thx,
> -Fabrice
>
> On Fri, Jul 6, 2012 at 2:52 PM, Andrej Bauer <andrej.bauer@andrej.com> wrote:
>> If I wanted a parser in Ocaml that can parse things in teh style of
>> Agda (with the cool underscore thingy), where would I start looking?
>>
>> With kind regards,
>>
>> Andrej
>>
>> --
>> Caml-list mailing list.  Subscription management and archives:
>> https://sympa-roc.inria.fr/wws/info/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>> Bug reports: http://caml.inria.fr/bin/caml-bugs
>>
>
>
>
> --
> Fabrice LE FESSANT
> Chercheur en Informatique
> INRIA Saclay -- Ile-de-France
> Programming Languages and Distributed Systems
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

  parent reply	other threads:[~2012-07-06 13:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06 12:52 Andrej Bauer
2012-07-06 13:17 ` Fabrice Le Fessant
2012-07-06 13:22   ` Anil Madhavapeddy
2012-07-06 13:23   ` Wojciech Meyer [this message]
2012-07-06 14:32 ` Gabriel Scherer
2012-07-06 15:15 ` Jérémie Dimino
2012-07-06 21:50   ` Andrej Bauer

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=CAOg1smBbsULE5--cgKaCciJYCMi5Z8v4eRYZeN2quassM79SSQ@mail.gmail.com \
    --to=wojciech.meyer@googlemail.com \
    --cc=Fabrice.Le_fessant@inria.fr \
    --cc=andrej.bauer@andrej.com \
    --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).