caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Edgar Friendly <thelema314@gmail.com>
To: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Patch to 3.10.0 compiler enabling simple	spell-checking
Date: Tue, 30 Oct 2007 00:53:30 -0500	[thread overview]
Message-ID: <4726C6DA.2010608@gmail.com> (raw)
In-Reply-To: <45E766F6-29C7-4710-8E32-9C6007A516FF@cs.princeton.edu>

Yitzhak Mandelbaum wrote:
> Very cool! Do you think there's any way you could separate it from the
> compiler, like Learner et al.'s SEMINAL work, which separates type error
> messages from the compiler?. Separation could help ensure this (and any
> other, similar) ideas don't accidentally introduce bugs into the
> compiler, and make it much easier for you to maintain. A very simple
> hack might be tod wrap ocamlc in a script that parses such error
> messages and then tokenizes the source file, looking for similar strings?
> 
> Cheers,
> Yitzhak
> 
Separating it from the compiler would keep from interfering with the
compiler's activities, but it would add some difficulties:

Parsing ocaml - I guess I could steal the parser out of the current
source code, and use the internal parse tree, but it'd be a lot more
difficult than what I've done so far.

Namespaces - Ocaml has a ton of namespaces.  At the moment, the patch
doesn't find mistyped module names, but it does distinguish the
following: type parameters, type constructors, classes, row variables,
values, constructors, labels and instance variables.

Visibilty/scope - A simple script would have to add much complication to
keep track of where each identifier is visible - Maybe easy, maybe not.

Parsing the output of the ocaml compiler - ocamlc lacks i18n to make
this extra difficult, but the error messages don't follow any spec, and
could change at any time.


On the plus side, if the simpler hack were built into an IDE, it could
embed a list of corrections into a right-click menu, like a spell
checker.  It could do this outside the current cycle of edit -> compile
-> edit

I don't have interest in doing this - my ideas of a super-ocaml-IDE seem
too big for me to program ATM.

E.


  reply	other threads:[~2007-10-30  5:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29 21:11 Edgar Friendly
2007-10-29 21:34 ` [Caml-list] " Till Varoquaux
2007-10-29 23:32 ` Julien Moutinho
2007-10-30  5:51   ` Edgar Friendly
2007-10-30  0:13 ` Yitzhak Mandelbaum
2007-10-30  0:17 ` Yitzhak Mandelbaum
2007-10-30  5:53   ` Edgar Friendly [this message]
2007-10-30  8:15 ` Sébastien Hinderer
2007-10-30 15:50   ` [Caml-list] " Edgar Friendly
2007-10-30 15:58     ` Sébastien Hinderer

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=4726C6DA.2010608@gmail.com \
    --to=thelema314@gmail.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;
as well as URLs for NNTP newsgroup(s).