caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] using infix operators/functions in modules when not using "open"
@ 2012-04-26 22:36 ocamllist.robertwork
  2012-04-26 23:01 ` Haoyang Wang
  0 siblings, 1 reply; 5+ messages in thread
From: ocamllist.robertwork @ 2012-04-26 22:36 UTC (permalink / raw)
  To: caml-list

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

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.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-04-27  8:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-26 22:36 [Caml-list] using infix operators/functions in modules when not using "open" ocamllist.robertwork
2012-04-26 23:01 ` Haoyang Wang
2012-04-27  0:28   ` Anthony Tavener
2012-04-27  6:57   ` Gabriel Scherer
2012-04-27  8:30     ` Goswin von Brederlow

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).