caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ignore in postfix position
@ 2018-01-09 11:49 Gerd Stolpmann
  2018-02-07 11:09 ` Josh Berdine
  0 siblings, 1 reply; 2+ messages in thread
From: Gerd Stolpmann @ 2018-01-09 11:49 UTC (permalink / raw)
  To: caml-list


[-- Attachment #1.1: Type: text/plain, Size: 971 bytes --]

Hi list,

the "ignore" function behaves specially when applied to a partial function:

# ignore (fun _ -> ());;
Warning 5: this function application is partial,
maybe some arguments are missing.

This very useful warning is not emitted, however, when I switch to a
slight variation, like:

# (fun _ -> ()) |> ignore

I like this post-fix syntax more than the original because "ignore"
isn't then as distracting, but it's a pity that the warning can no
longer be generated. I am wondering whether this behavior is deeply
anchored in the inference engine or whether this is improvable.

Gerd

-- 
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
My OCaml site:          http://www.camlcity.org
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
------------------------------------------------------------



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2018-02-07 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-09 11:49 [Caml-list] ignore in postfix position Gerd Stolpmann
2018-02-07 11:09 ` Josh Berdine

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