From: Haoyang Wang <hywang@pobox.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] using infix operators/functions in modules when not using "open"
Date: Thu, 26 Apr 2012 16:01:46 -0700 [thread overview]
Message-ID: <3C0F509D-8590-4D45-A586-83630088C7B5@pobox.com> (raw)
In-Reply-To: <CAN2fQM6PmfgkBspx1Js0yq8r2hbtd15mhvDXQ6tUcmAL46q=rw@mail.gmail.com>
On Apr 26, 2012, at 3:36 PM, ocamllist.robertwork@spamgourmet.com wrote:
> I'm a OCaml newbie. I don't understand how to use infix functions that are in modules when I don't want to use "open".
>
> I did discover http://xahlee.org/ocaml/functions.html which explains that an infix operator can be used as a prefix. So, this format:
>
> ((Module.(op)) "foo" "bar")
>
> does seem to work. But, intuitively, it seems like:
>
> "foo" Module.(op) "bar"
>
> would work -- it doesn't.
>
> Is there a way to keep the infix notation?
>
> Thanks.
Module.("foo" (op) "bar")
next prev parent reply other threads:[~2012-04-26 23:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 22:36 ocamllist.robertwork
2012-04-26 23:01 ` Haoyang Wang [this message]
2012-04-27 0:28 ` Anthony Tavener
2012-04-27 6:57 ` Gabriel Scherer
2012-04-27 8:30 ` Goswin von Brederlow
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=3C0F509D-8590-4D45-A586-83630088C7B5@pobox.com \
--to=hywang@pobox.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