caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Frank Christoph <christo@nextsolution.co.jp>
To: gurr@snap.med.ge.com (David Gurr)
Cc: caml-list@inria.fr
Subject: Re: ergonomie du compilateur
Date: Thu, 23 Jan 1997 23:18:19 +0900	[thread overview]
Message-ID: <199701231418.XAA00607@sparc3.co.jp> (raw)
In-Reply-To: <199701221717.JAA16849@swag.med.ge.com>

> So what could the compiler do to help?  I suppose that it would be possible
> for the toplevel to throw you into a prolog like interpreter when it hits a
> type error.  You could enter type variables and it would reply with the type
> that is the value of the type variable, etc.  There would be a predefined
> predicate |- for type judgements.  This would make the metalevel type
> inference as accessable and perhaps as understandable as the baselevel
> values.

  This is an interesting idea and I have some sympathy for it.  But I suspect
it might confuse some beginners even more, especially those who have never
used Prolog, since

  * the type unification has nothing to do with the execution model
  * it requires learning a new syntax for routine debugging .

But I could be wrong.  You have to learn a new command syntax to use existent
command-line debuggers anyway...

  I once suggested a related feature to Alastair Reid, but for Haskell program
editors.  I thought it would be useful if the user could click on an
identifier and have the type displayed.  This can be more useful in Haskell
than in ML because of type classes and the extended inference algorithm.  I
think he told me that, in an old release of the Yale Haskell system (when they
were still using LISP as a backend!), something of the sort was once possible
but Yale has sinced scrapped that implementation.

  Rice has a very nice Scheme programming environment called DrScheme which
includes a static debugger ("MrSpidey") that can do soft type inference.  It
essentially lets you do what I described above: you run the inferencer, click
on an identifier and it pops up a box next to it that displays a set
expression indicating what kinds of values the variable might hold at
run-time.  There is a description of it in the PLDI '96 proceedings, "Catching
Bugs in the Web of Program Invariants" by Matthew Flatt, et al. It's really
neat; if you have time, I recommend downloading it and checking it out for
yourself, even if you're not really a Scheme programmer.  (I'm not.)

http://www.cs.rice.edu/CS/PLT/packages/drscheme

Note:
I just checked the site and it looks like the newest release (47) is lacking
the debugger, so I recommend you get an earlier one, like version 42.

-- 
Frank Christoph                 Next Solution Co.      Tel: 0424-98-1811
christo@nextsolution.co.jp                             Fax: 0424-98-1500





  reply	other threads:[~1997-01-23 15:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-22 17:17 David Gurr
1997-01-23 14:18 ` Frank Christoph [this message]
1997-01-24  2:51   ` Jacques GARRIGUE
  -- strict thread matches above, loose matches on Subject: below --
1997-01-20 21:33 Quercia
1997-01-21  9:10 ` Pierre Weis
1997-01-21 10:31 ` Emmanuel Engel
1997-01-15  9:46 David Monniaux
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

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=199701231418.XAA00607@sparc3.co.jp \
    --to=christo@nextsolution.co.jp \
    --cc=caml-list@inria.fr \
    --cc=gurr@snap.med.ge.com \
    /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).