caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Tuareg mode vs. recursive modules
@ 2005-05-31 18:23 "Márk S. Zoltán"
  2005-05-31 19:51 ` [Caml-list] " Albert Cohen
  0 siblings, 1 reply; 3+ messages in thread
From: "Márk S. Zoltán" @ 2005-05-31 18:23 UTC (permalink / raw)
  To: caml-list

Hello, everyone -

I was just recently been plagued with unexplainable freezes in Emacs 
while using Tuareg. (I am using Emacs 21.3.1 on Windows 2000, Tuareg v. 
1.45.0-rc1) After a long search I have narrowed down the problem to the 
following code:

module rec A : B =
  struct
  end
and C : D = E(A)

This sort of recursive module definition apparently is not identified as 
a phrase by Tuareg, as a consequence it cannot be automatically 
indented, so whenever I hit Alt-Q, Emacs just hangs/runs into an 
infinite loop (95-98% CPU usage level).

On the other hand, this code is harmless:

module rec A : B =
  struct
  end
and C : D =
  struct
  end

so the problem must lie with the use of functors in recursive modules.

I have no good idea where to look next. Tried to make sense of the 
phrase identification code in tuareg.el, but I am no Emacs guru, so my 
failure was predictable. Tried it on a brand new install of Fedora - no 
personal settings added, same Emacs and Tuareg versions as on W2K - and 
it works (i.e. freezes) all the same. Searching the internet yielded no 
clues at all. Is this a known problem, has anybody else encountered it?

Thanks

    Z-





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

* Re: [Caml-list] Tuareg mode vs. recursive modules
  2005-05-31 18:23 Tuareg mode vs. recursive modules "Márk S. Zoltán"
@ 2005-05-31 19:51 ` Albert Cohen
  2005-06-03 15:52   ` "Márk S. Zoltán"
  0 siblings, 1 reply; 3+ messages in thread
From: Albert Cohen @ 2005-05-31 19:51 UTC (permalink / raw)
  To: "Márk S. Zoltán"; +Cc: caml-list

Thanks for the bug report.

It should be fixed right now, as well as a few previous bugs that I
had no time to fix for weeks... sorry about that.

Best regards,
                                                            Albert Cohen

On Tue, May 31, 2005 at 08:23:15PM +0200, "Márk S. Zoltán" wrote:

> Hello, everyone -
> 
> I was just recently been plagued with unexplainable freezes in Emacs 
> while using Tuareg. (I am using Emacs 21.3.1 on Windows 2000, Tuareg v. 
> 1.45.0-rc1) After a long search I have narrowed down the problem to the 
> following code:
> 
> module rec A : B =
>   struct
>   end
> and C : D = E(A)
> 
> This sort of recursive module definition apparently is not identified as 
> a phrase by Tuareg, as a consequence it cannot be automatically 
> indented, so whenever I hit Alt-Q, Emacs just hangs/runs into an 
> infinite loop (95-98% CPU usage level).
> 
> On the other hand, this code is harmless:
> 
> module rec A : B =
>   struct
>   end
> and C : D =
>   struct
>   end
> 
> so the problem must lie with the use of functors in recursive modules.
> 
> I have no good idea where to look next. Tried to make sense of the 
> phrase identification code in tuareg.el, but I am no Emacs guru, so my 
> failure was predictable. Tried it on a brand new install of Fedora - no 
> personal settings added, same Emacs and Tuareg versions as on W2K - and 
> it works (i.e. freezes) all the same. Searching the internet yielded no 
> clues at all. Is this a known problem, has anybody else encountered it?
> 
> Thanks
> 
>     Z-
> 
> 
> 
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

-- 
Albert Cohen                            http://www-rocq.inria.fr/~acohen


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

* Re: [Caml-list] Tuareg mode vs. recursive modules
  2005-05-31 19:51 ` [Caml-list] " Albert Cohen
@ 2005-06-03 15:52   ` "Márk S. Zoltán"
  0 siblings, 0 replies; 3+ messages in thread
From: "Márk S. Zoltán" @ 2005-06-03 15:52 UTC (permalink / raw)
  To: Albert Cohen; +Cc: caml-list

Albert Cohen wrote:

>Thanks for the bug report.
>
>It should be fixed right now, as well as a few previous bugs that I
>had no time to fix for weeks... sorry about that.
>
>Best regards,
>                                                            Albert Cohen
>
>  
>

Thanks for the quick response, and at the same time sorry for bearing 
bad news again.
I assume you mean the 1.45 version, since the file dates changed around 
the time you posted your reply to my post (31st of May, 21:48). I have 
installed the new files but the problem still persists. If you just type 
in the code I posted,

module rec A : B =
  struct
  end
and C : D = E(A)

then position the cursor inside it somewhere (e.g. on 'end') and press 
Alt+Q for reindent, it just hangs there. Is it something in my setup, is 
anyone able to reproduce the error?

Regards

    Z-




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

end of thread, other threads:[~2005-06-03 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-31 18:23 Tuareg mode vs. recursive modules "Márk S. Zoltán"
2005-05-31 19:51 ` [Caml-list] " Albert Cohen
2005-06-03 15:52   ` "Márk S. Zoltán"

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