Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: David Monniaux <David.Monniaux@ens-lyon.fr>
To: Caml-list <caml-list@inria.fr>
Subject: ergonomie du compilateur
Date: Wed, 15 Jan 1997 10:46:39 +0100 (MET)	[thread overview]
Message-ID: <Pine.GSO.3.95.970115103536.5934B-100000@bellecour> (raw)

-- VERSION FRANCAISE --
Bonjour à tous,
je trouve un aspect pénible au compilateur Ocaml, ou d'ailleurs au
toplevel, c'est son report d'erreur. En effet, il est quelquefois assez
difficile de retrouver l'origine du problème.
Si les messages du type "Parse error", bien que peu explicites, ne sont
toute de même pas trop pénibles quand on a l'habitude (il suffit
pratiquement de compter les parenthèses!), il n'en est pas de même pour
les messages d'erreur de typage.
En effet, souvent une erreur de typage intervient à une ligne donnée non
pas à cause d'un problème à cette ligne, mais à cause d'un problème à une
ligne antérieure. S'il est souvent assez facile de retrouver où a été typé
un terme, cela devient quelquefois difficile, notamment avec les fonctions
récursives, pour le type de la fonction.
Ne pourrait-on pas faire que, sur demande, le compilateur, lorsqu'il
rencontre une erreur de type, ressorte d'où il a inféré les types qui lui
posent problème?

-- ENGLISH VERSION --
Hello all,
I find the Ocaml compiler, or the toplevel, sometimes quite tiresome with
its error reporting. It is sometimes difficult to trace the origin of an
error.
While the messages of the "Parse error" kind, if not very explicit, are
not too bothersome because with some experience one can fix that kind of
errors quite easily (most often, just count the parenthesises!), this is
not the case for typing errors.
A typing problem in a line of code often happens not because this line is
buggy, but because some previous line is, from which the types of terms in
the current line have been inferred. Often it's not too difficult to trace
where those inferences took place, but it's sometimes tedious, especially
with recursive functions.
Couldn't the Ocaml compiler be made to have, on request, more verbose
messages on typing errors, including the trace of inferences of the terms
to cause problems?

-- David Monniaux, student at ENS-Lyon
"Si l'informatique marchait, cela se saurait."







             reply	other threads:[~1997-01-20 18:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-15  9:46 David Monniaux [this message]
1997-01-21 10:33 ` Xavier Leroy
1997-01-21 10:35 ` Claude Marche
1997-01-21 12:54 ` Hendrik Tews
1997-01-23 16:37   ` Ian T Zimmerman
1997-01-30  9:55   ` Xavier Leroy
1997-01-31 14:21     ` Donald Syme
1997-01-20 21:33 Quercia
1997-01-21  9:10 ` Pierre Weis
1997-01-21 10:31 ` Emmanuel Engel
1997-01-22 17:17 David Gurr
1997-01-23 14:18 ` Frank Christoph
1997-01-24  2:51   ` Jacques GARRIGUE

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=Pine.GSO.3.95.970115103536.5934B-100000@bellecour \
    --to=david.monniaux@ens-lyon.fr \
    --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