caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OCaml 4.02 & {<delim>| in comments
@ 2014-08-02  9:23 Richard W.M. Jones
  2014-08-02  9:31 ` David Allsopp
  0 siblings, 1 reply; 3+ messages in thread
From: Richard W.M. Jones @ 2014-08-02  9:23 UTC (permalink / raw)
  To: caml-list

I came across a strange problem when compiling Coq.  The compiler
grumbled about an unterminated string, but pointed me to a comment:

  (* between u v = {w|u<=w<=v, w canonical}          *)

This was a puzzle, but I added the following patch to Coq to fix it
and moved on.

----------------------------------------------------------------------
--- coq-8.4pl4.old/kernel/univ.ml	2014-04-24 16:13:03.000000000 +0100
+++ coq-8.4pl4/kernel/univ.ml	2014-08-01 11:00:10.447233148 +0100
@@ -226,7 +226,7 @@
 
 
 (* between : UniverseLevel.t -> canonical_arc -> canonical_arc list *)
-(* between u v = {w|u<=w<=v, w canonical}          *)
+(* between u v = { w | u<=w<=v, w canonical }          *)
 (* between is the most costly operation *)
 
 let between g arcu arcv =
----------------------------------------------------------------------

Today I was reading about the new ppx extensions, and now I understand
that {<delim>| is the syntax used for quoted strings.  Puzzle solved!

However my question is: Is it a bug that the compiler complains about
{<delim>| inside a comment?

Rich.

-- 
Richard Jones
Red Hat

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

end of thread, other threads:[~2014-08-11  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-02  9:23 [Caml-list] OCaml 4.02 & {<delim>| in comments Richard W.M. Jones
2014-08-02  9:31 ` David Allsopp
2014-08-11  8:59   ` 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).